zhouhuaian / bot-test-repo

0 stars 0 forks source link

Message lost in case of exception in Message Composer #108

Open zhouhuaian opened 3 months ago

zhouhuaian commented 3 months ago

I have written (very simple) custom composer class. It just receives a JMSObjectMessage and according to message contents it creates an ESB-aware message or throws an exception. The creation of ESB aware message works fine and the message is properly delivered to receiver. In the second case an exception is thrown and the original message should be redelivered, but this is not happening. Instead of redelivery, message is lost.

In case that an exception is thrown, the original message should be routed to deadletter queue. But when I try to obtain this message from the deadletter queue (either queue/DLQ or using a MessageStore instance), the queue is empty. It contains no messages and the message is lost.

I also tried to use jca-provider instead of jms-provider. This provider was also unable to deliver message to proper receiver. JCA provider tried several times to redeliver message, but after all the message ended up in DLQ queue (queue/DLQ).