To prepare for a problem message, configure the system to move that message to an exception destination and allow other messages to be processed successfully.
The destination to which the MDB or SCA composite listens must use an exception destination. This exception destination can be the system default, or one configured specifically for the destination.
In this scenario, the enterprise application is a continuously running system that uses a deployed MDB or SCA composite to access an external system resource.
When a problem message (msg1 in this scenario) is encountered, it is put back on the queue.
Instead of msg1 being made available to the MDB or SCA composite immediately, it is hidden for the Delay between failing message retries retry delay of five seconds.
The next message on the queue (msg2) is processed by the MDB or SCA composite. This message and subsequent messages succeeds.
When the Delay between failing message retries for msg1 expires, msg1 is unhidden and reprocessed. It is put back on the queue again.
The MDB or SCA composite continues to process subsequent messages normally but each time msg1 is processed, it is put back on the queue.
When the number of times msg1 has been unhidden, rolled back and rehidden reaches the Maximum failed deliveries per message limit (five times in this scenario), it is moved to the configured exception destination.