You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Tim Bain <tb...@alumni.duke.edu> on 2018/09/07 22:00:32 UTC

Re: Webapp shutdown hangs on JMS Consumer

Are you closing the consumer when your app gets notified that it's shutting
down? If not, why not?

Tim

On Fri, Jul 20, 2018, 8:14 AM Mauro de Wit <ma...@gmail.com> wrote:

> Hi all,
>
> I have a webapp deployed on JBoss which connects to an external JMS broker
> (ActiveMQ 5.15.4) using the the ActiveMQ resource adapter 5.15.4. The
> webapp
> cannot be undeployed or shutdown because the ActiveMQMessageConsumer
> blocks.
> (The entire JBoss container cannot even stop). Only when the broker is
> shutdown, the webapp shutdown is continuing.
>
> A thread dump reveals te following information:
>
>    java.lang.Thread.State: TIMED_WAITING (on object monitor)    at
> java.lang.Object.wait(Native Method)    at
> org.apache.activemq.FifoMessageDispatchChannel.dequeue(FifoMessageDispatchChannel.java:74)
>
> - locked <0x000000008bc1a1a8> (a java.lang.Object)      at
> org.apache.activemq.ActiveMQMessageConsumer.dequeue(ActiveMQMessageConsumer.java:486)
>
> at
>
> org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:653)
>
> The queue is being read by a MessageConsumer like:
>
> Message message = this.consumer.receive(1000);
>
> Any suggestions? In the activeMQ sources I saw that a prefetch policy of 0
> causes an indefinite wait, but setting this to a higher value had no
> result.
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>