activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhurlburtusa <da...@realgo.com>
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.

Thanks,

Dan
--
View this message in context: http://www.nabble.com/Throwing+Runtime+Exceptions+with+MessageListener%27s+onMessage+Method-t1708551.html#a4638517
Sent from the ActiveMQ - User forum at Nabble.com.


Mime
View raw message