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
How to guarantee that one message consumed exactly once? #52
Comments
This looks to be very strange to me unless you have enqueued multiple similar Instances f bid to the queue. It should not have duplicate consumption, also time interval is quite small ~ 20Ms. Can you see if by any-chance you're enqueueing multiple messages from different place for the same bid? How frequently you're observing this issue? |
@sonus21 My apology. It's my misunderstanding. There are still remaining jobs (messages) in the queue from the previous execution.
But I inspected that the messages were not removed. |
That's the correct way to delete all messages, did this call return true/false? False means something was not correct. |
How do you know it's deleted or not? You should either check dashboard or redis keys to find that. One small improvement to your code, you don't have to use rqueue/rqueue-core/src/main/java/com/github/sonus21/rqueue/models/event/RqueueBootstrapEvent.java Line 23 in 7044cb9
|
Thank you for your improvement. I use RDM (GUI for redis) to inspect keys in the DB. Even
Did I configure Rqueue wrong? |
IIUC, you're looking at wrong redis keys, you should check |
BTW m-datas are not deleted, this will be fixed in next upcoming released. |
What is |
|
Describe the bug
I have 3 job queues. Jobs in the first queue create jobs in the second queue.
Even I assign numRetries to 0. But the second RqueueListener seems to consume one message twice?
How can I configure to guarantee that one message consumed exactly once?
Thank you.
How to Reproduce
Screenshots
Library Dependencies
The text was updated successfully, but these errors were encountered: