Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#244] MQ: Add initial-backoff option to enqueue #245

Closed
wants to merge 2 commits into from

Conversation

st3fan
Copy link
Contributor

@st3fan st3fan commented Nov 23, 2020

Draft Pull Request because it is work in progress.

For #244 - This patch adds an :initial-backoff-ms option to enqueue. I implemented this by allowing an initial value to be set in the qk-backoffs hash on message creation. This seems to do the trick.

Also included a new test to validate the :initial-backoff-ms behaviour. I think it would be interesting to do a bit of a stress test with this feature - are longer running tests allowed/wanted?

@ptaoussanis
Copy link
Member

@st3fan Hi Stefan, definitely open for a PR- and this is looking good, thanks!

I think it would be interesting to do a bit of a stress test with this feature - are longer running tests allowed/wanted?

Allowed + wanted 👍

@st3fan
Copy link
Contributor Author

st3fan commented Nov 23, 2020

Thank you for tips - I'll work on some improvements and better tests. I also left a question at https://github.com/ptaoussanis/carmine/pull/245/files#diff-9f2681c4ea1ec7b7c79bb31ad60f7b4847786cd2b4f3df935e8eb8c58869d364R176 but now I am actually wondering if the behaviour under that comment is correct .. if there are two messages available, should dequeue actually return eoq-backoff ?

@st3fan st3fan force-pushed the st3fan/initial-backoff branch 2 times, most recently from 07ee929 to 9af62e4 Compare November 24, 2020 01:22
@st3fan st3fan marked this pull request as ready for review November 24, 2020 02:59
Copy link
Member

@ptaoussanis ptaoussanis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting one last argument tweak (sorry for any confusion).
Otherwise PR looks solid to me. Tests look good.

Once you can update, I'll add the enqueue backwards-compatibility and cut a new release.

Thanks a lot for the great work on this.

Cheers

src/taoensso/carmine/message_queue.clj Outdated Show resolved Hide resolved
test/taoensso/carmine/tests/message_queue.clj Show resolved Hide resolved
@ptaoussanis
Copy link
Member

https://github.com/ptaoussanis/carmine/releases/tag/v3.1.0 is now on Clojars 👍
Thanks again.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants