You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by jahlborn <ja...@gmail.com> on 2018/07/19 19:02:16 UTC

close listener session without rolling back active message

So, one thing we recently realized about activemq is that if you have a
message listener actively processing a message, and you close that session
(e.g. the jvm is shutting down), the transaction for the message will end up
rolling back (although the listener will continue happily until completion). 
Once we noticed this behavior, we found that this is clearly documented in
http://activemq.apache.org/message-redelivery-and-dlq-handling.html .  That
said, i'm wondering why this is the chosen behavior as well as if there is a
way i could handle this differently.  Basically, i want the listener to
finish handling the current message and then shutdown the jvm (not handle
any more messages at this time).  I don't see any way to do this cleanly. 
am i missing something?  Also, in the current situation, since the current
transaction is going to be rolled back, why isn't the listener interrupted
instead of allowed to continue on doing work which ultimately is useless?  



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html