You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Initialize the "RMQDestination" with Routing Key and Exchange Name ("amqp mode").
Put a message in the queue, with "relivered" flag set and no headers.
Try to receive the message
Expected behavior
No NPE is thrown, and the code runs into the branch where deliveryCount == null, which sets the JMSXDeliveryCount is set to "2".
Additional context
Stacktrace (shortened):
java.lang.NullPointerException: Cannot invoke "java.util.Map.get(Object)" because the return value of "com.rabbitmq.client.AMQP$BasicProperties.getHeaders()" is null
at com.rabbitmq.jms.client.RMQMessage.handleJmsRedeliveredAndDeliveryCount(RMQMessage.java:886) ~[rabbitmq-jms.jar:2.8.0]
at com.rabbitmq.jms.client.RMQMessage.convertAmqpMessage(RMQMessage.java:866) ~[rabbitmq-jms.jar:2.8.0]
at com.rabbitmq.jms.client.RMQMessage.convertMessage(RMQMessage.java:835) ~[rabbitmq-jms.jar:2.8.0]
at com.rabbitmq.jms.client.RMQMessageConsumer.receive(RMQMessageConsumer.java:358) ~[rabbitmq-jms.jar:2.8.0]
at com.rabbitmq.jms.client.RMQMessageConsumer.receive(RMQMessageConsumer.java:272) ~[rabbitmq-jms.jar:2.8.0]
The text was updated successfully, but these errors were encountered:
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.
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):
The text was updated successfully, but these errors were encountered: