What acknowledgement mode are you using? If it's AUTO_ACK, I'd expect that you've already acknowledged the message when the exception is thrown, which would make this expected behavior, but I'd expect you could use a different ack mode to get the behavior you want. On Mar 11, 2016 7:27 AM, "THMayr" <thomas.m...@adesso.de> wrote:
> Hi, > > I deployed a MDB on WildFly 10.0.0. An external ActiveMQ server is > configured in WildFly with the ActiveMQ resource adapter. > > When the method /onMessage()/ of the MDB method throws a runtime exception, > the message is not redirected to the DLQ. This works only, when container > managed transaction handling is used, a transaction is required, and I set > the transaction to be roll-backed by the container when the exception > occurs > (MessageDrivenContext.setRollbackOnly()). In this case no exception is > thrown to the container. > > When I do the same in WebLogic it works! > > I cannot use container managed transactions in my MDB. So is there a way to > redirect the message to the DLQ when processing fails? > > Thomas > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/Message-not-redirected-to-DLQ-when-exception-thrown-by-MDB-tp4709187.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >