Closed abepetrillo closed 8 years ago
@jjbohn Please Review.
Instead of asking people to remember to add x-dead-letter-routing-key
, can we make it so they have to? Throw an error saying they need it for instance?
Should we automatically bind the main queue
with a routing key of it's name so there's no manual setup that needs to happen?
For instance, something like cp-dashboard.interaction_updater
would get bound to two routing keys, interaction.lifecycle.update
and cp-dashboard.interaction_updater
.
We should fully test out timeouts, rejects, etc.
@jjbohn hm, what manual step are you referring to? I don't see how binding the main queue with another routing key of its name would change anything.
@brianstorti oh, nm, I read something wrong. Ignore the manual comment.
@jjbohn second look?
:+1:
This change introduces a retry handler. If a message is rejected for any reason, the same message will be processed again for a given number of times. The default number of retries is 5.
Do not foget to include the routing key for your dlx queue:
x-dead-letter-routing-key
as demonstrated in the comments.This is mostly copying @brianstorti's code from another repo, so thanks man!