AMQP
AMQP и RabbitMQ: exchange, queue, binding и подтверждения, Quorum Queues и кластер, Spring AMQP, очередь заданий и рассылка, чем отличается от Kafka и что выбрать.
Why it matters for UCP. RabbitMQ is the standard broker for work queues, RPC, and broadcast messages between UCP services. Without an understanding of the AMQP model and Spring AMQP, a service loses messages at the first hiccup. Part of the training program.
The AMQP protocol and RabbitMQ — covered at the level of the protocol itself, day-to-day operations, framework code, and making a deliberate choice between AMQP and Kafka.
Articles in the series
- The AMQP protocol: exchange, queue, binding, ack — the AMQP 0.9.1 model, the four exchange types (direct/topic/fanout/headers), routing keys, ack/nack/reject, prefetch, publisher confirms, TTL. Not tied to any particular broker.
- RabbitMQ in production: Quorum Queues, clustering, monitoring — every-node-knows-everything clustering, Quorum Queues vs Streams vs Classic, the removal of classic mirroring in 4.0, federation/shovel, persistence, monitoring via Prometheus.
- Spring AMQP: RabbitTemplate, @RabbitListener, retry, DLX —
RabbitTemplate,@RabbitListener+ConcurrentRabbitListenerContainerFactory, error handling,RetryTemplate, declarative DLX, publisher confirms in Spring. - Messaging patterns over AMQP: work queue, pub/sub, RPC — five classic patterns (work queue, publish/subscribe, routing, topic, RPC) plus idempotent consumer, the Dead Letter pattern, and Outbox over AMQP.
- AMQP vs Kafka: which broker to choose — the key difference between the models (queue vs log), push vs pull, ordering, throughput vs latency, scenarios where AMQP wins, where Kafka does, and when to use both together.
Related
- Apache Kafka — fundamentals — the flagship example of the log model.
- Distributed patterns — Saga, Outbox, Idempotent Consumer: applicable to any broker.
- Architectural choices — other major forks in the road.
- Use Case Pattern — the methodology in which this knowledge is applied.