Skip to content

Message acknowledgement

A message acknowledgement tells the broker that a delivery has been received or processed according to the agreed rule.

APIs & Integration

A message acknowledgement tells a message broker when it may treat a delivery as completed. The direction of the acknowledgement and the point at which the application sends it are crucial.

In RabbitMQ, a consumer uses a manual positive acknowledgement such as basic.ack to confirm its processing to the broker. A publisher confirm, by contrast, confirms acceptance on the broker side to the sender. It does not establish that the receiving application has finished its task.

Between saving and acknowledging

In a fictional flow, a service processes message E-42, durably saves the required database change and then acknowledges it. If it acknowledges first and crashes before saving, the broker may already consider the delivery completed even though the change is missing.

The opposite gap also matters: if the change is saved but the acknowledgement is lost, redelivery can follow. With manual acknowledgements, RabbitMQ requeues unacknowledged messages after a connection or channel closes. The service must therefore handle repetition without creating the business result twice.

Automatic acknowledgement in RabbitMQ does not wait for the application’s work to finish. The selected mode must fit the intended protection against lost work. A consumer acknowledgement is also no evidence that every downstream service or an external notification succeeded.

Sources

Articles on this topic

APIs & Integration with ASES

ERP, CRM and shop cleanly connected