activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Bain <tb...@alumni.duke.edu>
Subject Re: kill -9 in message listener
Date Wed, 03 Aug 2016 02:30:30 GMT
The message will only be delivered to another consumer if it hasn't yet
been acknowledged.  And whether that has happened at the point your process
dies depends on what your acknowledgement mode is.  The default is
auto-ack, where a message is acked as soon as it is delivered to a
consumer, even if it hasn't been successfully processed.  But there are
other acknowledgement modes, as well as transactions, and the behavior
you'll see depends on exactly which options you're using.  The wiki has
lots more detail about both acknowledgement modes and transactions.

Keep in mind that a kill -9 will sever TCP connections without cleanly
shutting them down, so the remote (broker) end won't close until the
timeout expires, which can lead to undesirable effects in some
circumstances. So think about whether what you're doing is actually the
right choice, compared to calling System.exit() or something similar.

Tim

On Jul 28, 2016 4:50 AM, "raster3" <crscca@yahoo.co.in> wrote:

> Hi,
> Lets say there are 2 similar message listeners in two different jvms.
> They receive numbers as text messages.
> in 1st listener 3 will cause a Kill -9 of the listener process using
> Processbuilder and some means to detect process id.
> In 2nd listener 4 will cause  a Kill -9 of the listener process using
> Processbuilder and some means to detect process id.
> if kill -9 is executed in one listener (when message or rather its thread
> is
> inside the listener method) is it safe to assume the message will be
> received by the other listener?  Or will this message be lost?
>
> Thanks.
> Raster
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/kill-9-in-message-listener-tp4714620.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message