1 Reply Latest reply on Oct 31, 2011 12:15 AM by jaikiran pai

    How to configure DLQ to be durable?

    daniel_spasojevic Newbie



      We are testing our DLQ configuration in AS7 and have found that it does not seem to be durable between application server restarts.


      The queue to which messages are sent is configured:



      <jms-queue name="MyQueue">

           <entry name="queue/MyQueue"/>




      and the address is configured:



      <address-setting match="jms.queue.MyQueue">


            <redelivery-delay> 1000</redelivery-delay>






      The DLQ is configured:



      <jms-queue name="deadLetterQueue">

            <entry name="queue/deadLetterQueue"/>




      Both of these queues are reported as durable through the JMX Console. When a bad message (one that causes redeliveries to occur) is sent to MyQueue and the application server restarted, redelivery resumes when it is restarted - so it appears to be durable.


      After the configured number of redeliveries, the message is sent to the DLQ as expected:



      2011-10-31 10:44:37,441 WARN  [org.hornetq.core.server.impl.QueueImpl] (Thread-15 (group:HornetQ-server-threads31731034-479240824)) Message Reference[4294982256]:RELIABLE:ServerMessage[messageID=4294982256,priority=4,expiration=0, durable=true, address=jms.queue.MyQueue,properties=TypedProperties[{http_content$type=application/json, http_link=<>; rel=source-host, postedAsHttpMessage=true, http_content$length=8}]] has reached maximum delivery attempts, sending it to Dead Letter Address jms.queue.deadLetterQueue from jms.queue.MyQueue



      When the message is dumped as JSON through the JMX console, the durable property of the message has been retained as expected:









            "http_link":"<>; rel=source-host",













      However, when the application server is restarted, the message no longer appears on the DLQ. The message count (as reported by the JMX Console) drops to zero.


      Besides message and queue durability, what else determines whether a message is persisted between application server restarts? What is the correct way to configure the DLQ so that messages will be retained across restarts? The dead-letter example doesn't seem to do anything differently here.