1
votes

I have built several Mule processes that consume messages from jms queues (ActiveMQ). Whenever a Mule component throws an exception, the transaction that consumes the messages rollback and the message gets redelivered to the original queue. After a few tries, it will be sent to a dead letter queue (DLQ.queuName).

We have this working OK, but we are missing the exception thrown, either the first one or the last one, we don't care (it'll probably be the same). This is something that can be done on other brokers (like WebLogic JMS), but I've been struggling with this for a while to no avail.

Does anybody know if this is something that can be configured or do I need to build a specific Mule exception handler or policy for ActiveMQ.

TIA, Martin

1

1 Answers

1
votes

That exception is lost in ActiveMQ at the moment (don't know about Mule) but it is reported to the log as error. It would make a good enhancement, remembering the string form of the exception in the ActiveMQConsumer and passing it back to the broker with the poison Ack that forces it to go to the DLQ. In that way, it could be remembered as a message property in the resulting DLQ message. How would you like to handle the exception, have it reported to a connection exception listener or have it recorded in the DLQ message?