You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am learning wascally and like it this far. There's something I don't understand about the handlers:
Fact 1: handlers are not bound to a specific exchange or queue, but to a message type.
Fact 2: when using dead-lettering, a rejected message is sent to a dead-letter-exchange with (possibly) a new routingKey, but the message type is unchanged.
This means that the original handler will pick up the rejected message once again.
What have I missed here – how do you use dead-lettering with wascally? It seems you have to add a check in every handler that the received message isn't dead already (if you don't wanna try processing it again... but then I would have nack it instead of rejectit...).
The text was updated successfully, but these errors were encountered:
n321203
changed the title
Question: How do you handle() dead lettered messages?
Question: Handlers picking up dead lettered messages
Feb 2, 2016
n321203
changed the title
Question: Handlers picking up dead lettered messages
Question: Avoid handlers from picking up dead lettered messages?
Feb 2, 2016
Update: I have solved this by setting a routingKey on each message, and never set a message type. This way, the handlers fall back to using routingKeys (since message types are not available).
The dead-lettering-exchange changes the routingKey, which means a separate handler picks up all rejected messages.
Hi, I am learning wascally and like it this far. There's something I don't understand about the handlers:
Fact 1: handlers are not bound to a specific exchange or queue, but to a message
type
.Fact 2: when using dead-lettering, a rejected message is sent to a dead-letter-exchange with (possibly) a new
routingKey
, but the messagetype
is unchanged.This means that the original handler will pick up the rejected message once again.
What have I missed here – how do you use dead-lettering with wascally? It seems you have to add a check in every handler that the received message isn't dead already (if you don't wanna try processing it again... but then I would have
nack
it instead ofreject
it...).The text was updated successfully, but these errors were encountered: