RabbitMQ用于异步、解耦通信 — 常见用例包括任务/作业队列、微服务消息传递、负载分布和各种消息传递模式。理解这些用例可以明确RabbitMQ适用于何处。
常见用例
✓ TASK / JOB QUEUES → offload time-consuming work to background workers (e.g. send emails,
process images, generate reports) → fast responses, async processing (the classic use)
✓ DECOUPLING microservices → services communicate via messages (independent, resilient)
✓ LOAD DISTRIBUTION → distribute tasks across multiple workers (competing consumers →
parallel processing, scaling)
✓ ASYNC workflows → coordinate steps in a process via messages
✓ PUB/SUB → broadcast events to multiple consumers (fanout)
✓ RPC / request-reply → request/response messaging between services
✓ Buffering / smoothing load → absorb spikes; workers process steadily
