2 Replies Latest reply on Mar 13, 2013 12:19 PM by ranajitjana

    Message Retry Not working

    ranajitjana

      Hi,

      I have used the following configuration for the message retry.

       

       

                      <address-settings>

                          <address-setting match="#">

                              <dead-letter-address>jms.queue.deadLetterQueue</dead-letter-address>

                              <expiry-address>jms.queue.expiryQueue</expiry-address>

                              <redelivery-delay>30</redelivery-delay>

                              <max-delivery-attempts>20</max-delivery-attempts>

                              <max-size-bytes>100000</max-size-bytes>

                              <page-size-bytes>20000</page-size-bytes>

                              <address-full-policy>PAGE</address-full-policy>

                              <message-counter-history-day-limit>10</message-counter-history-day-limit>

                              <last-value-queue>true</last-value-queue>

                              <redistribution-delay>0</redistribution-delay>

                              <send-to-dla-on-no-route>true</send-to-dla-on-no-route>

                          </address-setting>

                      </address-settings>

       

      The issue I am facing is if the message fails it does not go back to the queue.Also the error which should appear in the Jms should be printed again and again if the same is called for retry.

      Currently the error is showing up only one.

       

      and I see 4 messages put into the deadLetterQueue.

       

      When I try to dequeue and read the messages than deadletter queue print the following when we print the message.

       

      HornetQMessage[null]:PERSISTENT.

       

      all the queues are configured fine and I can see them from the console.

       

      Any idea where I am going wrong.

        • 1. Re: Message Retry Not working
          ranajitjana

          Probably it has to do with the XA transaction. I am using

          <pooled-connection-factory name="hornetq-ra">

                                  <transaction mode="xa"/>

                                  <connectors>

                                      <connector-ref connector-name="in-vm"/>

                                  </connectors>

                                  <entries>

                                      <entry name="java:/JmsXA"/>

                                  </entries>

            </pooled-connection-factory>

          Will  this factory be XA compliant ?

           

          my standalone.xml has following entry

           

          <bean id="jmsTemplate"

          class="org.springframework.jms.core.JmsTemplate">

          <property name="connectionFactory" ref="connectionFactory" />

          </bean>

           

          <bean id="sendSMS"class="com.somecomp.project.jms.JmsQueueSender">

          <property name="queue" ref="smsQueue" />

          <property name="jmsTemplate" ref="jmsTemplate" />

          </bean>

           

           

           

          <bean id="smsmessageListener" class="org.springframework.jms.listener.adapter.MessageListenerAdapter">

          <constructor-arg>

          <bean id="smsSender" class="com.somecompany.project.jms.JMSListnerForSendingSMS">

          </bean>

          </constructor-arg>

          </bean>

           

           

           


          <jee:jndi-lookup id="connectionFactory" jndi-name="java:/JmsXA"/>
          • 2. Re: Message Retry Not working
            ranajitjana

            Strange thing is deadLetter queue attribute "messages added " is showing continuous increase eventhough nothing is pumped in any queue. The attribute "Message in the Queue" for the deadLetterQueue is still 0.

            Dequeued messages are null messaged and when printed shows HornetQMessage[null]:PERSISTENT