Redelivery messages to consumers #411
Replies: 1 comment
-
Hello @alejandro-jara, You definitely cannot leave it as it is. If you don't acknowledge a single message nothing terrible will happen immediately. The message will just hang in the "limbo". It won't be redelivered to other consumers until the original consumer that received it lives. In the long run this may block your consumer due to the run out of the consumer credit [1]. It some situations (when the message grouping is enabled), it may even lead to the blockage of the entire queue. There are few schools of thought how to tackle this kind of situations. You can reject the message by calling The downside of this approach is that it may disrupt the message ordering, as you are effectively putting the message back on the queue. If the future redeliveries end up in rejections as well, you may end up in the loop. The message will be redelievered until you successfully acknowledge it or its The other approach that is quite popular if you don't have any infrastructure built around the Sorry for the long answer. I hope all the points are clear. Best, [1] https://havret.github.io/dotnet-activemq-artemis-client/docs/consumer-credit |
Beta Was this translation helpful? Give feedback.
-
Hello, I hope you are well. I am receiving the messages and with the payload making an HTTP request to an api. This api could return a successful status or for some reason a status with 4xx code. In these cases I am only executing acceptAsync only if the status is 2xx for the others I do nothing. In these cases the messages continue to exist in the queue but are not sent again. Should this be contemplated using reject() or should it be a setting of Artemis itself?
Thank you very much and sorry for the inconvenience
Beta Was this translation helpful? Give feedback.
All reactions