-
Notifications
You must be signed in to change notification settings - Fork 626
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
ImmediateAcknowledgeAmqpException keeps the message in the queue #2607
Comments
Apparently that doesn't work for
So, instead of throwing that exception from your Closed as |
This scenario I shared is a simple version of the problem, but what if I want to immediate-ack from the Error Handler? For example, I have a custom Error Handler that has to map business exceptions into AQMP-ones. I have already successfully used What should I do in this case? |
The |
Thank you @artembilan for the explanation! |
@artembilan, one last question: how can I handle errors that happen in the post-processor but still within the listener method? |
Yeah...
This way it does not reach listener method yet. Reopening as this sounds like valid request. Thanks |
@artembilan, thanks again for your help. |
So, the fix is in. Thanks |
@artembilan, thank you for your effort! I will take a look at the snapshot version. I hope this will be included in the next Spring Boot release (we usually bring it all together). |
Correct. We have it scheduled for February, 19th. |
In what version(s) of Spring AMQP are you seeing this issue?
3.1.1
Describe the bug
When
ImmediateAcknowledgeAmqpException
is thrown from the code of the listenerit is expected that the message that has just been consumed by the listener
will be automatically acknowledged and removed from the queue.
To Reproduce
Clone https://github.com/alexey-anufriev/spring-amqp-immediate-ack
Run
./mvnw clean test
Expected behavior
Queue is empty
Sample
https://github.com/alexey-anufriev/spring-amqp-immediate-ack
The text was updated successfully, but these errors were encountered: