activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhurlburtusa <>
Subject Throwing Runtime Exceptions with MessageListener's onMessage Method
Date Wed, 31 May 2006 03:12:10 GMT

The JMS tutorial says that throwing a RuntimeException in the
MessageListener's onMessage method is considered a programming error. If you
are using Jenck's and hence using ActivationSpecs, how do you show that an
error occurred while consuming a message? The ActivationSpec only allows
auto-acknowledgement or dups-ok-acknowledgement. Duplicate messages is not
ok in my situation. This leaves auto-acknowledgement as my only options. If
during the consumption of a message in the onMessage method an error occurs,
how do I show that an error occurred if I am not suppose to throw a
RuntimeException. I don't want the message consumed if an error occurs.


View this message in context:
Sent from the ActiveMQ - User forum at

View raw message