Details
-
Bug
-
Resolution: Done
-
Major
-
JBoss A-MQ 6.3
-
None
-
User Experience
Description
DLQ attribute of the dead letter queue is getting changed after broker restart. After restart, broker does not consider dead letter queue as DLQ(DLQ='true') and hence while retryMessages() operation is throws exception as below:
ERROR: java.lang.RuntimeException: Failed to execute query task. Reason: javax.management.MBeanException: java.lang.Exception: Retry of message is only possible on Dead Letter Queues!
Replication Steps:
1. Sends messages in JMS queue where and make sure you set message expiration using
~~~
_producer.setTimeToLive(1000).
~~~
2. Once messages expired, you can see that all the messages are present in DLQ.
3. When we check the DLQ attribute in the Hawtio console, it is observed as true(DLQ='true') for DLQ. (Check the screenshot BeforeRestartDLQ.png)
4. Use below command on Karaf console to get output:
>> activemq:query -QQueue=test_queue.DLQ --invoke retryMessages
[org.apache.activemq:type=Broker,brokerName=amq,destinationType=Queue,destinationName=test_queue.DLQ].retryMessages = 10
It works as per expectation till here.
5. Follow the steps-1 and step-2 again.
6. Restart the A-MQ broker.
7. Check in Hawtio and DLQ attribute will be false (DLQ='false') for DLQ. (Check screenshot AfterRestartDLQ.png) .
If we check the output of retry message, we will observe error:
>> activemq:query -QQueue=test_queue.DLQ --invoke retryMessages
ERROR: java.lang.RuntimeException: Failed to execute query task. Reason: javax.management.MBeanException: java.lang.Exception: Retry of message is only possible on Dead Letter Queues!
That is expected behavior. DLQ flag is not stored on disk. It is just set at runtime when used as a dlq. Any queue can become a dlq.
DLQ attribute should remain true so that even after restart expired messages can be moved back to original destination.
Attachments
Issue Links
- causes
-
ENTESB-6297 Retry Button for a DLQ disappears after restarting the Fuse Server
- Closed
- is duplicated by
-
ENTESB-6297 Retry Button for a DLQ disappears after restarting the Fuse Server
- Closed