-
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
Limit x-death header length growth #78
Comments
Otherwise the list can grow forever in some cases. Fixes #78.
The new code doesn't count the number of times we have been at a certain queue, it just records the fact that that we have been there. That's removing a bit too much information IMO, a counter would be useful, non-leaky, and easy to add. I am not completely convinced this has not broken cycle detection for some more arcane types of cycles. I shall try to have a think about that. The Java tests introduce new Channel APIs! That's an unexpected side effect of this bug 😄 I don't think |
I agree, the number of times would be nice. The user who reported the problem mentionned it as well. After reading the cycle detection code, I think it still works: it only looks for one entry for the current queue. |
Yes, but cycle detection makes decisions based on the {reason, queue} pair, but the branch only keeps one header per queue. That smells dubious to me. So for example if you have a message which (for some odd reason) keeps getting dead lettered to the same queue, but with alternating reasons of I'm not sure if I can get a change in behaviour the other way round (which would be much more dangerous of course). And that is a bit of a contrived example. But it's still a real behaviour change that I think we can avoid. What I would like to see when adding a new
...which I think is what @michaelklishin has done but with the addition of a counter and matching on |
Matching on |
Ready for another review:
|
The logic of this looks OK to me now. Admittedly I haven't actually run it. I have a bunch of style complaints, take them as seriously as you wish:
I would inline Personally I don't find abstracting away the names of headers to be any clearer either (since you always have to mentally look it up) so I'd kill I would rather the new field be called |
I gave the branch a try and did:
I tried again but this time with |
I've renamed the field, removed the unused import and did some refactoring (introducing |
While here, wrap long lines to fit 80 columns. References #78.
The associated PR (#79) was merged to |
We group x-death header values before processing them to make sure there's only one per {queue, reason}.
Support x-death event values from before #78
file:consult/1 is OK to parse a configuration file with some TLS settings, but it does not support parsing "complex" settings like a function to validate the hostname. This commit introduces a hook so that the calling application can provide a custom function instead of the default file:consult/1 and this way easily support parsing the app settings. Fixes #78
Original bug: 26538.
See https://groups.google.com/forum/#!topic/rabbitmq-users/dwdE-DySy3E.
After discussing a few options, we've decided to cap the growth by having one value per queue (the most recent one).
The text was updated successfully, but these errors were encountered: