When using either AUTO or MANUAL acknowledgment modes, you can use the acknowledgementTimeout parameter to control how long the message remains in-flight waiting to be acknowledged, before automatically returning to the queue.
The acknowledgementTimeout timer begins when the message is consumed.
If acknowledgementTimeout is not set, Anypoint MQ Connector uses two minutes.
If you need a different TTL, you must define it explicitly in the acknowledgementTimeout parameter of the subscriber.
When using acknowledgementTimeout, consider expected app-time processing, including time for unexpected delays, such as external systems delay and app back-pressure due to high load. For example, if you expect the consumed message to be processed in 10 seconds, set acknowledgementTimeout to a minimum of 15 seconds.
|
|
When using the prefetch mode in the Subscriber source, Anypoint MQ attempts to honor the expiration time specified by acknowledgementTimeout.
However, Anypoint MQ extends the expiration timeout if the time that the message remains in the buffer reaches 80% of the timeout value.
For this reason, don’t use prefetch mode if the acknowledgementTimeout must be honored.
|
Acknowledgment Timeout — AUTO Acknowledgement Mode
After a subscriber consumes a message, a timer starts, indicating how long the message has been in-flight for the broker waiting for acknowledgment. If the flow processing does not end with a success or failure before the acknowledgementTimeout limit is reached, the message automatically returns to the queue for redelivery.
Acknowledgment Timeout — MANUAL Acknowledgement Mode
When consuming a message using MANUAL acknowledgment mode by either the Subscriber or Consume operations, the app must execute either an ACK or NACK operation using the message ackToken before the acknowledgementTimeout limit is reached. If neither operation executes with the given token before the timeout, the message automatically returns to the queue for redelivery. Any attempt to acknowledge the message after the timeout limit fails due to an expired token.