Exception destinations
An exception destination is a location for messages that cannot be delivered to, or remain on, a specified target destination, but that also cannot be discarded. Exception destinations prevent the loss of messages when this is required by the quality of service specified for a message.
An exception destination can be used in the following situations:
- Service integration cannot deliver a message to the specified target destination, and cannot discard the message because of the quality of service of the message. Service integration delivers the message to an exception destination.
- A message exceeds the maximum number of delivery attempts to a transactional consumer. This situation might occur if the transactional consumer fails and the message backs out and is consumed again repeatedly. When the delivery limit (the Maximum failed deliveries per message) is reached, the message goes to the exception destination.
- A destination that has messages on it is deleted. Those messages are moved to an exception destination.
For each of these situations, we can configure which exception destination processing to use:
- Use the default exception destination of the relevant messaging engine.
Each messaging engine has a default exception destination called _SYSTEM.Exception.Destination.messaging_engine_name created automatically when a messaging engine is created. This default exception destination stores messages that cannot be delivered for bus destinations that are localized to the messaging engine. When we use the default exception destination, an administrator can access all messages that cannot be delivered for a messaging engine in a single location.
We cannot modify the default exception destination and we must not delete it.
- Use a specific exception destination associated with the relevant resource, for example, a queue destination, a topic space destination, a service integration bus link or an IBM MQ link.
The exception destination associated with a destination is used if a message cannot be delivered because the number of delivery attempts to a transactional consumer is exceeded. When we use a specific exception destination for a queue or topic space destination, an administrator can access those undeliverable messages for that destination in one location.
The exception destination associated with a link is used if a message cannot be delivered because the target destination is full or does not exist.
An exception destination must be a queue destination, and can be local or remote. The exception destination must already exist before configuring another resource to use that exception destination. If the exception destination is not a queue, or if it does not exist when the message arrives, messages are rerouted to the default exception destination of the relevant messaging engine.
that we cannot configure an exception destination for a bus; configure an exception destination for each destination on the bus.
- Do not reroute undeliverable messages to any exception destination, that is, specify None.
Attempts to deliver the message continue. For a service integration bus link, an undeliverable message might block the processing of other messages waiting for delivery to the same destination. For an IBM MQ link, an undeliverable message might block the processing of other messages waiting for delivery through that link to the same bus.
The report options that are set in the properties of individual messages can affect exception destination processing. Depending on the report option that is set, when the conditions apply for service integration to send a message to an exception destination, service integration also sends a report message to the reply-to destination of the message, or discards the message instead of sending it to the exception destination, or both.
- Best-effort messages are always discarded if they cannot be delivered to their target destination, that is, they never use an exception destination.
- A message cannot be available to consumers until it is successfully delivered to a destination.
Service integration cannot guarantee the ordering of messages sent to an exception destination. Because of this, if message order is important, we can configure a bus destination so that it does not use an exception destination. In this situation, the Maximum failed deliveries per message limit specified for the destination is ignored, and the message remains available to consumers. Synchronous consumers repeatedly attempt to get the message; message-driven beans and other asynchronous consumers repeatedly attempt consume the message. This situation continues until either the message is removed from the destination (for example, by an administrator using the administrative console) or the consumer can subsequently process the message without rolling back.
Related:
IBM MQ link sender Message reliability levels - JMS delivery mode and service integration quality of service Configure exception destination processing for a link to a foreign bus Configure exception destination processing for a bus destination Manage messages that use foreign bus connections States of the IBM MQ link and its channels JMS report messages Destination defaults [Settings]