You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Doug Harmon (JIRA)" <ji...@apache.org> on 2017/05/23 20:49:04 UTC

[jira] [Comment Edited] (AMQ-6682) AMQ client hangs when stopping Spring DefaultMessageListenerContainer

    [ https://issues.apache.org/jira/browse/AMQ-6682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16021827#comment-16021827 ] 

Doug Harmon edited comment on AMQ-6682 at 5/23/17 8:48 PM:
-----------------------------------------------------------

Logic to close consumer and connection is not being called yet by Spring DMLC. Appears mutex.wait() in FifoMessageDispatchChannel.java:72 is blocked forever, preventing Spring DLMC doShutdown from closing consumer and connection.



was (Author: dsharmo):
Consumer and connection is not being called yet by Spring DMLC. Appears mutex.wait() in FifoMessageDispatchChannel.java:72 is blocked forever, preventing Spring DLMC doShutdown from closing consumer and connection.


> AMQ client hangs when stopping Spring DefaultMessageListenerContainer
> ---------------------------------------------------------------------
>
>                 Key: AMQ-6682
>                 URL: https://issues.apache.org/jira/browse/AMQ-6682
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JMS client
>    Affects Versions: 5.14.5
>         Environment: JDK 1.8.0_112
> spring-jms-4.3.8.RELEASE.jar
> activemq-client-5.14.5.jar
>            Reporter: Doug Harmon
>
> When using spring's DefaultMessageListenerContainer (DMLC) to consume messages from AMQ 5.14.5 server, and using prefetch of 0, spring container hangs when shutting down DMLC (e.g. on tomcat server shutdown). 
> Applicable 2 threads from spring client app thread dump (logs on separate network so I cannot copy/paste):
> "dmlc-1" ...
>  at org.apache.activemq.FifoMessageDispatchChannel.dequeue(FifoMessageDispatchChannel.java:72)
>  - locked <> (a java.lang.Object)
>  at org.apache.activemq.ActiveMQMessageConsumer.dequeue(ActiveMQMessageConsumer.java:486)
>  at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:648)
> "http-bio-exec-11" 
>    at org.springframework.jms.listener.DefaultMessageListenerContainer.doShutdown(DefaultMessageListenerContainer.java:571)
> ...
> Applicable spring configuration file:
> <bean id="jmsFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
>     <property name="brokerURL">
>       <value>tcp://localhost:61616?jms.prefetchPolicy.queuePrefetch=0</value>
>     </property>
>   </bean>
> <bean id="queue" class="org.apache.activemq.command.ActiveMQQueue">
>   <constructor-arg index="0" value="myQueue" />
> </bean>
> <bean id="dmlc" class="org.springframework.jms.listener.DefaultMessageListenerContainer">
>     <property name="connectionFactory" ref="jmsFactory" />
>     <property name="destination" ref="queue" />
>     <property name="messageListener" ref="myQueueConsumer" />
>     <property name="sessionTransacted" value="true" />
> </bean>



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)