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
The method setBasicPropertiesToHeaders in class SpringAMQPHeader reads the deliveryMode property while consuming a message. Shall this instead read receivedDeliveryMode property?
Through wireshark and spring-amqp logging I can see if a producer sends different values for delivery-mode (PERSISTENT / NON_PERSISTENT), they get deserialised in receivedDeliveryMode property. Hence the above class fails in NPE while reading from a queue.
In addition, below snippet from Spring Rabbit jar (class DefaultMessagePropertiesConverter) gives me impression that while reading a message it would set the receivedDeliveryMode field only while setting deliveryMode to null always.
Am I missing something here? My present code, when switched from 1.6.3 of this repo to 1.7.0, fails with NPE with below stacktrace
Caused by: java.lang.NullPointerException: null
at org.springframework.amqp.core.MessageDeliveryMode.toInt(MessageDeliveryMode.java:34)
at amqp.spring.camel.component.SpringAMQPHeader.setBasicPropertiesToHeaders(SpringAMQPHeader.java:69)
at amqp.spring.camel.component.SpringAMQPMessage.fromAMQPMessage(SpringAMQPMessage.java:53)
at amqp.spring.camel.component.SpringAMQPConsumer$RabbitMQMessageListener.onMessage(SpringAMQPConsumer.java:197)
at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:856)
Any suggestion please?
Cheers
Mainak
The text was updated successfully, but these errors were encountered:
Hi
The method
setBasicPropertiesToHeaders
in classSpringAMQPHeader
reads thedeliveryMode
property while consuming a message. Shall this instead readreceivedDeliveryMode
property?Through wireshark and spring-amqp logging I can see if a producer sends different values for delivery-mode (PERSISTENT / NON_PERSISTENT), they get deserialised in
receivedDeliveryMode
property. Hence the above class fails in NPE while reading from a queue.In addition, below snippet from Spring Rabbit jar (class
DefaultMessagePropertiesConverter
) gives me impression that while reading a message it would set thereceivedDeliveryMode
field only while settingdeliveryMode
to null always.Am I missing something here? My present code, when switched from 1.6.3 of this repo to 1.7.0, fails with NPE with below stacktrace
Any suggestion please?
Cheers
Mainak
The text was updated successfully, but these errors were encountered: