WildFly HornetQ Message Redelivery on Failure and the Dead Letter Queue: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
 
(11 intermediate revisions by the same user not shown)
Line 2: Line 2:


* [[WildFly_HornetQ-Based_Messaging_Subsystem_Configuration#Subjects|WildFly HornetQ-Based Messaging Subsystem Configuration]]
* [[WildFly_HornetQ-Based_Messaging_Subsystem_Configuration#Subjects|WildFly HornetQ-Based Messaging Subsystem Configuration]]
* [[HornetQ_Address_Settings#Message_Redelivery_on_Failure_and_the_Dead_Letter_Queue|HornetQ Address Settings]]
* [[MDB Failure Handling]]


=Overview=
=Overview=


If HornetQ fails to deliver a message, it's default behavior is to retry delivery to the consumers of the destination for a set number of times. If the redelivery fails for all configured redelivery attempts, HornetQ will send the message to a configurable dead letter queue.
If HornetQ fails to deliver a message, its default behavior is to retry delivery to that destination for a set number of times, until the delivery succeeds. If all subsequent redelivery attempts fail, HornetQ will send the message to a configurable Dead Letter Queue.


=Configuration=
=Configuration=


Redelivery behavior (redelivery count, redelivery delay and the dead letter queue) is configurable on a per-address basis.
Redelivery behavior, which consists of maximum redelivery attempts before the message is sent to the Dead Letter Queue, redelivery delay and the address of the Dead Letter Queue itself, is configurable on a per-address basis.


<pre>
<pre>
...
<address-settings>
<address-settings>
                    <address-setting match="#">
    <address-setting match="#">
                        <dead-letter-address>jms.queue.DLQ</dead-letter-address>
        <dead-letter-address>jms.queue.DLQ</dead-letter-address>
                        <expiry-address>jms.queue.ExpiryQueue</expiry-address>
        <redelivery-delay>0</redelivery-delay>
                        <redelivery-delay>0</redelivery-delay>
        <max-delivery-attempts>10</max-delivery-attempts>
                        <max-size-bytes>10485760</max-size-bytes>
        ...
                        <page-size-bytes>2097152</page-size-bytes>
    </address-setting>
                        <address-full-policy>PAGE</address-full-policy>
</address-settings>
                        <message-counter-history-day-limit>10</message-counter-history-day-limit>
...
                    </address-setting>
</pre>
                </address-settings>
 
====dead-letter-address====
 
The address of the "Dead Letter Queue". It can also be a topic.
 
====max-delivery-attempts====


</pre>
The default redelivery attempt count, if not specified in configuration, is 10.
 
If -1 or 0, the delivery is attempted forever.

Latest revision as of 20:54, 25 April 2017

Internal

Overview

If HornetQ fails to deliver a message, its default behavior is to retry delivery to that destination for a set number of times, until the delivery succeeds. If all subsequent redelivery attempts fail, HornetQ will send the message to a configurable Dead Letter Queue.

Configuration

Redelivery behavior, which consists of maximum redelivery attempts before the message is sent to the Dead Letter Queue, redelivery delay and the address of the Dead Letter Queue itself, is configurable on a per-address basis.

...
<address-settings>
    <address-setting match="#">
        <dead-letter-address>jms.queue.DLQ</dead-letter-address>
        <redelivery-delay>0</redelivery-delay>
        <max-delivery-attempts>10</max-delivery-attempts>
        ...
    </address-setting>
</address-settings>
...

dead-letter-address

The address of the "Dead Letter Queue". It can also be a topic.

max-delivery-attempts

The default redelivery attempt count, if not specified in configuration, is 10.

If -1 or 0, the delivery is attempted forever.