-
Notifications
You must be signed in to change notification settings - Fork 143
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
Question: how to handle redelivery #588
Comments
Try Some activemq broker configurations could also affect the redelivery and deadlettering behavior. For details check out https://activemq.apache.org/components/classic/documentation/message-redelivery-and-dlq-handling |
Hey, thanks for your response. I figured out why the message wasn't moved to DLQ, i was not setting the Durable header to true when publishing my test messages. So now when i reject or modify a message as However i dont entirely understand yet why Is it expected that we should check the delivery count on consumer side and then reject or mark as undeliverable here so it moves to DLQ? I kind of would have expected the broker to move the message to DLQ after consumer side marked it as deliveryfailed for x amount of times. Note:
//Johan |
Released and modified outcomes are explained in the specification (section 3.4.4 and 3.4.5). It is expected that you get the same message repeatedly for released and modified with Deadlettering based on delivery-count is broker specific. It might be better to ask the ActiveMQ community how that is handled. By default ActiveMQ only considers persistent message for deadlettering. In my testing I added the following to the broker config.
I think setting the message header has the same effect. |
Hello,
I'm using amqpnetlite to connect to an activemq classic broker. Im struggling how to implement redeliveries and moving it to DLQ.
Specifically when an exception occurs when processing in
OnMessage
. A message i can choose to Reject, Release or Modify from what i can see in the API. Ive tried to reject, outcome is on activemq the message is marked as Dequeued. I've also tried to Release, i seem to get like unlimited redeliveries then, only when i quit the app the redelivery count is increased in activemq.Same for modify, i get unlimited redeliveries, delivery count keeps increasing on consumer side, but not on broker side.
Expected behavior:
Redelivery is increased on activemq broker side so it should be automatically moved to a configured DLQ.
What am i missing here?
Edit:
I also tried publishing the message myself to DLQ using a separate ISenderLink, however i get an exception saying: "Message was not received by this link"
My consumer code:
The text was updated successfully, but these errors were encountered: