Simple definition
AMQP is a messaging protocol used between applications and processing systems. A producer sends information, while a consumer handles it when available. This separation avoids keeping a user request open for an entire lengthy operation and helps services cope with different arrival and processing rates during normal operation.
Technical definition
Identify the protocol version in use: AMQP 1.0 and AMQP 0-9-1 are distinct and are not wire-compatible. Concepts and client libraries must match the broker and version. TCP 5672 and TLS-protected 5671 are conventional, configurable ports; reaching either port does not prove that a client and server speak compatible protocols.
In RabbitMQ’s AMQP 0-9-1 model, an exchange routes messages into queues through routing rules. Consumer acknowledgements and publisher confirms answer different questions: did the broker take responsibility for the publication, and did the consumer acknowledge the delivery? Neither should be confused with an independent confirmation of the final business outcome.
What is it used for?
AMQP messaging can support invoice generation, document production and software integration. Reliability also depends on retention settings, acknowledgements, retries and broker architecture. Putting a task into a queue does not establish that it completed. The application needs a way to trace the business result independently of message transport.
Practical example
After an order, a website publishes an invoice-generation request. A worker processes it and acknowledges at the appropriate point. If the connection fails after document creation but before acknowledgement, delivery may happen again. A stable business identifier lets the application recognize completed work instead of producing a second invoice.
Key points
| Element | Role |
|---|---|
| Publisher confirm | Broker feedback to the producer about publication handling |
| Consumer acknowledgement | Consumer feedback at the point selected by the application |
| Redelivery | May require protection against duplicate business operations |
| AMQP 1.0 / 0-9-1 | Identify the version before choosing clients and configuration |
Common problems
- Growing queue: compare arrival rate, consumption, errors and worker capacity.
- Unacknowledged deliveries: investigate stalled consumers or unusually long processing.
- Repeated deliveries: inspect retry handling, idempotency and error classification before increasing attempts.
Operational checks and limitations
Define how to handle messages that cannot be processed, timeouts and retry limits. Separate authentication, authorization, TLS and routing when investigating failures. Monitor queues and consumers together with business completion. An empty queue can indicate successful processing, but can also hide a consumer that acknowledges work incorrectly or too early.