Chapter 18. Configuring Dead Letter Addresses

A dead letter address is defined in the address-setting element of the messaging-activemq subsystem configuration. To read the current configuration for a given address-setting, use the following management CLI command as an example.

/subsystem=messaging-activemq/server=default/address-setting=ADDRESS_SETTING:read-attribute(name=dead-letter-address)

If a dead-letter-address is not specified, messages are removed after trying to deliver max-delivery-attempts times. By default, messages delivery is attempted 10 times. Setting max-delivery-attempts to -1 allows infinite redelivery attempts. The example management CLI commands below illustrate how to set the dead-letter-address and the max-delivery-attempts attributes for a given address-setting.

/subsystem=messaging-activemq/server=default/address-setting=ADDRESS_SETTING:write-attribute(name=dead-letter-address,value=NEW_VALUE)

/subsystem=messaging-activemq/server=default/address-setting=ADDRESS_SETTING:write-attribute(name=max-delivery-attempts,value=NEW_VALUE)

For example, a dead letter can be set globally for a set of matching addresses and you can set max-delivery-attempts to -1 for a specific address setting to allow infinite redelivery attempts only for this address. Address wildcards can also be used to configure dead letter settings for a set of addresses.

See Address Settings for details on creating and configuring an address-setting.