-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Introduce headers when message gets dispatched to client #177
Comments
If you need to add a header when a message is routed, it should be one of the easiest plugins: a custom exchange type (that otherwise mimics one of the existing ones). If you specifically want to do that when a message is actually delivered, this requires changing RabbitMQ core and is moderately difficult. |
Ok, thank you very much. I guess i can try to learn erlang a little. Adding the header when message is routed is a fine option as well, didn't really consider it. Thank you very much for the feedback. |
@michaelklishin That would allow me to catch the time when message got dispatched as well. Any thoughts about using this? |
Besides effort, AFAIK, per-spec the broker shouldn't modify messages. It should just pass messages as-is, without modifying them. |
We already add headers when dead-lettering. We never modify the body or remove user-provided headers other than BCC. |
@c-datculescu tracing effectively doubles internal message rate. It's not a very good idea for most cases (outside of development environments). |
I would not enable tracing full time. my idea was to enable it just enough to troubleshoot the issue and disable it afterwards. Regarding dead-lettering and headers, we hit a funny issue in production. if a message is dead lettered more than 498 times, as i remember, we start getting some errors. this is an edge case that we dealt with by limiting the number of times we dead-letter, but it was a little tricky to discover the reason. Thanks for the answers. |
That DLX issue might have been solved in the latest RabbitMQ release
|
Hello all.
I would like to propose the introduction of a set of custom headers that should be attached to a message when the message is delivered to a client, similar to the dead-letter headers option.
The use case for this addition will be in the case of buffered clients, there is no way to say how much time the message spent in the queue vs how much time the message actually spent in the local application cache. I think this should help in better understanding and isolating issues (currently i have people asking me whether there is a issue in RabbitMQ or in the applications we are using and i cannot say for sure when messages get delayed).
I am not sure exactly how much effort would this be since i have no knowledge of erlang whatsoever.
Thank you,
Cristian.
The text was updated successfully, but these errors were encountered: