---
schema_version: "1"
id: c3d63b03372d395b823ee6b137f31262aea2f3ce8ff5ee763bd6158d94e02b27
title: Handle Message Acknowledgment
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/amqp-connector/1.8/amqp-ack.md
canonical_url: https://docs.mulesoft.com/amqp-connector/1.8/amqp-ack
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 4d7fb6c5496f0329628977580a386232da879b3a6ff0f9ae5a8fa75fb83d37df
description: MuleSoft Documentation Site
release: "1.8"
latest: false
---
---
product: AMQP Connector
version: 1.8
---

# Handle Message Acknowledgment

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Anypoint Connector for AMQP provides different acknowledgment configurations.

## Automatic Acknowledgment On Success

The `AUTO` `ackMode` can be used in the `amqp:listener` component, causing the automatic ACK of the
received message **if and only if the flow execution completes successfully**. In case that an error
occurs during the flow execution that causes it to terminate prematurely, then the message will not
be ACKed and redelivery will occur.

## Immediate Acknowledgment

Setting the `ackMode` to `IMMEDIATE` either in `amqp:listener` or `amqp:consume` operations will
cause the Message to be automatically ACKed once it is consumed, and prior to any processing of the
Message by the application. Having the Message automatically acknowledged once it is received means
that the Message won\`t be redelivered if any error occurs during the processing of the Message, so
application logic like a dead letter queue has to be created to handle errors without losing
Messages.

## Manual Acknowledgment

As you may expect, the `MANUAL` `ackMode` delegates all the responsibility of performing the ACK on
the Message to the application logic.

With this configuration, every Message received by either the `listener` or `consume` operations
will have an `ackId` available in the MuleMessage `attributes` which identifies this Message
uniquely for a given channel.

The `ackId` that identifies the Message will then be passed on to the `amqp:ack` operation:

```xml
<flow name="consumerWithManualAck">
    <amqp:consume config-ref="config" queueName="${queueName}" ackMode="MANUAL" />

    <!--Do message processing-->
    <logger message="#[payload]">

    <amqp:ack ackId="#[attributes.ackId]" />
</flow>
```

## See Also

- [Listen For New Messages](https://docs.mulesoft.com/amqp-connector/1.8/amqp-listener)

- [Salesforce Help](https://help.salesforce.com)
