Is your consumer the only consumer for that topic? Disconnecting a non-durable topic consumer should result in the subscription being removed and all pending messages being DLQed/discarded. If you're not seeing that, could it be that you have another consumer attached and the in-flight messages are actually for that consumer?
I usually use the JMX information available in JConsole when attaching to the broker process when troubleshooting issues like these; can you describe what you see there when this happens? That might give some clues about what's going on... Tim On Thu, Apr 23, 2015 at 11:40 PM, khandelwalanuj < [email protected]> wrote: > Hi, > > Using ActiveMQ :5.10.0 > > We faced a strange issue where some messages sent on a topic are not > received by the client. This is non durable client. The issue here is those > mesasges are showing as inflight in jconsole which means broker sent those > messages and acknowledgment is not received by the broker. These messages > are inflight even after i restarted by client consumer. > > What could cause this issue where messages are not received by the client > from the broker and why messages are inflight in broker ? > > I am using simple spring configuration in my consumer : > > <bean id="jmsPnlContainer" > > class="org.springframework.jms.listener.DefaultMessageListenerContainer" > p:connectionFactory-ref="jmsPooledConnectionFactory" > p:destination-ref="testTopic" > p:durableSubscriptionName="PnLCompletionConsumer" > p:clientId="${jms.pnlCompletion.clientId}" > p:pubSubDomain="true" > p:subscriptionDurable="false" > p:sessionAcknowledgeModeName="AUTO_ACKNOWLEDGE" > p:sessionTransacted="true" > p:messageListener-ref="testconsumer" > /> > > Thanks, > Anuj > > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/ActiveMQ-topic-Messages-are-not-delived-to-a-client-tp4695554.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >
