On 11/15/2013 07:36 AM, jlpedrosa wrote:
Hi All,This also leads to the same problem: the execution of the event must
be done in the same thread that ActiveMQ uses, otherwise I can't throw the
exception to the listener.
When the message arrives, I just put the message on a thread pool. That is
the approach to implement multi thread processing. So If I want to rise an
exception to the NMS stack, I can't use multithread..
IE: [*ActiveMQ Task*] INFO  EventReceiver - Message handler received a
message in thread: ActiveMQ Task.
As you can see the listener gets executed in "ActiveMQ Task" thread, in the
moment I put the message in the thread pool and I raise an exception, my
code must handle it, I don't have any way to say NMS "Hey this message
failed!".
Is there any way I can rollback the message from another thread?
  Once again, Thanks
Rgds
JL




--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Rollback-NACK-a-single-message-tp4674444p4674541.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Why not just use a transacted session and commit or rollback based on your processing of the Message?

--
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.b...@redhat.com | www.fusesource.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/

Reply via email to