The Anypoint MQ ACK operation intermittently returns the following error:
Additionally, the exception stack trace contains no information on the root cause.
ERROR OnErrorPropagateHandler [[MuleRuntime].uber.123: [test-anypoint-mq-messaging].uber@com.mulesoft.extension.mq.internal.connection.AnypointMQConnectionProvider.connect:122 @537dd9ab]:
********************************************************************************
Message : Failed to ACK the message with id 'abcde12f-34g5-67h8-9ij0-k12345678901': An error occurred while executing the operation: ACK ONE MESSAGE. Cause: 404 - Not Found ({
"status" : "failure",
"statusMessage" : "Queue cannot be found"
}).
Element : message-process/processors/1/processors/3 @ test-anypoint-mq-messaging:process.xml:40 (Ack)
Element DSL : <anypoint-mq:ack doc:name="Ack" config-ref="Anypoint_MQ_Config" ackToken="#[vars.ackToken]"></anypoint-mq:ack>
Error type : ANYPOINT-MQ:DESTINATION_NOT_FOUND
FlowStack : at flow-dequeue-message-email(message-process/processors/1/processors/3 @ test-anypoint-mq-messaging:process.xml:40 (Ack))
Payload Type : org.mule.runtime.core.internal.streaming.bytes.ManagedCursorStreamProvider
--------------------------------------------------------------------------------
Root Exception stack trace:
com.mulesoft.mq.restclient.exception.ResourceNotFoundException: An error occurred while executing the operation: ACK ONE MESSAGE. Cause: 404 - Not Found ({
"status" : "failure",
"statusMessage" : "Queue cannot be found"
}).
The 404 Not found error occurs when the message Acknowledgement Timeout is reached before the ACK operation is executed in the flow. In such cases, the message is sent back to the same queue for consumption by the Subscriber listener. If Acknowledgement Timeout is not set, Anypoint MQ Connector defaults to two minutes. Refer to the documentation on Anypoint MQ Acknowledgement Timeout.
Additionally, if this queue is assigned a Dead Letter Queue (DLQ), the above scenario might repeat until the "Delivery attempts before reroute" count is met, after which the message will be moved to the DLQ. Refer to the documentation on Anypoint MQ Dead Letter Queues (DLQ).
This situation can occur if a high number of messages are being processed in the Subscriber flow without Max Concurrency configured, which could cause a delay in reaching the ACK operation within the Acknowledgement Timeout.
The solution to this error should be approached as a performance-tuning exercise. Follow the suggestions below and perform a load test to identify the appropriate values to configure:
Additionally, adding a logger component immediately after the Subscriber listener and right before the ACK operation will help analyze the time taken for a message to enter the flow and reach the ACK operation.
003714001

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.