-
Notifications
You must be signed in to change notification settings - Fork 55
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
Fix/routing key to queue name #172
Fix/routing key to queue name #172
Conversation
@pat-goins - I debugged and found that both |
@JatinSanghvi - yes, the case we ran into when For example, message routing could be setup like the scenario in the "Direct exchange" section from the RabbitMQ docs: If a message errored while processing from queue Q1, it would have If the intent is for an errored message to go back to the queue it came from, it should be republished on the default exchange with the routingKey of the originating |
To workaround the issue, we are doing something like this first thing inside our queue triggered functions: var originalRoutingKey = incomingMessage.RoutingKey;
incomingMessage.RoutingKey = Constants.Queues.AuditQueueName; |
Hi @pat-goins , thanks for the detailed explanation. I agree it makes sense to republish failed messages to default exchange with queue-name as the routing key. I should come back to the PR next week. Need to set some time to reproduce the error and verify your fix, and read on if there are any other alternate retry options (I doubt though) that works well with multiple bindings in place. |
Thanks @pat-goins 👍 I have merged the PR changes. |
When republishing failed messages, publish to the _queueName the message came from instead of the message's routing key.