I have tried using CLIENT_ACK on consumer side in my test applications using
spring.
here is what I have changes in config file:
   <bean id="jmsContainer"
       
class="org.springframework.jms.listener.DefaultMessageListenerContainer"
        p:connectionFactory-ref="jmsConnectionFactory"
        p:destination-ref="testQueue"
        p:durableSubscriptionName="ActiveMQConsumer"
        p:pubSubDomain="true"
        p:subscriptionDurable="false"
        p:sessionAcknowledgeModeName="CLIENT_ACKNOWLEDGE"
        p:clientId="${activemq.client.id}"
        p:messageListener-ref="consumer" />
     

My observations are below:
When consumer throws exception in "on_message()" those messages are
considered as inflight count. After that if I stop the consumer ans start it
again, I can see those messages are received.

Similar test I have tried with transactions where I added
sessionTransacted="true" and removed
p:sessionAcknowledgeModeName="CLIENT_ACKNOWLEDGE" in spring config.. Here I
found that at first messages are not delivered to consumer but without
restarting after some time (1,2 seconds) they are getting delivered to
consumer.
So does what does exact meaning of message_redelivery ? Is it that "If you
got any exception in one time than you don't have to restart consumer to get
the message" 






--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Transactions-in-ActiveMQ-tp4674759p4674916.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to