Closed chbriem closed 11 months ago
Thanks for using RabbitMQ.
What would expedite a fix is for us to easily be able to reproduce this issue. I am not a Java or JMS expert, but if you provided a project I could clone, compile, and run to see the issue, I could probably fix it in this code. It would take me at least an hour, probably several, to figure out how to set up a project to reproduce this issue. That's time I could be using to fix the issue.
Or, feel free to submit a PR yourself!
This client assumes that the value is always set because it is always set by RabbitMQ itself (to false
by default).
There's no harm in being more defensive, you are welcome to submit a PR. This is open source software after all.
Describe the bug
When receiving a message in "amqp mode" with a "Redelivered" flag set, and the given message does not contain any headers, then a NPE is thrown.
Reproduction steps
Expected behavior
No NPE is thrown, and the code runs into the branch where
deliveryCount == null
, which sets theJMSXDeliveryCount
is set to "2".Additional context
Stacktrace (shortened):