[
https://issues.apache.org/jira/browse/AMQ-6682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16033498#comment-16033498
]
Timothy Bish commented on AMQ-6682:
-----------------------------------
Looked again and so far I still don't see a bug with what information has been
given so far. A consumer receive will block and is not unblocked by connection
stop, so if the spring bits are waiting for the receive to return after
calling connection stop that'd be wrong. Would need a stack trace or thread
dump of the ActiveMQ threads to see what was hung up.
> 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)