RabbitMQ 擅长 task queues、灵活路由和传统消息传递,但并非适合所有场景 — 大容量流式处理倾向于 Kafka,非常简单的需求可能使用更简单的工具。理解 RabbitMQ 何时适用反映了正确的判断。
RabbitMQ 适用的情况
✓ TASK / JOB QUEUES → background processing, distributing work to workers (the classic use)
✓ COMPLEX ROUTING → flexible message routing (direct, topic, fanout exchanges)
✓ REQUEST/REPLY (RPC) → synchronous-style request/response messaging
✓ Per-message reliability/workflows → acks, individual message handling
✓ DECOUPLING microservices → moderate-volume async messaging
✓ When you need flexible, reliable, traditional messaging
RabbitMQ 可能不太适合的情况
⚠️ VERY HIGH-VOLUME event streaming → KAFKA is better (higher throughput, retention, replay)
⚠️ Need REPLAY / event retention → Kafka (RabbitMQ removes consumed messages)
⚠️ Many consumers of the SAME stream / event sourcing → Kafka
⚠️ Very SIMPLE needs / managed simplicity → a cloud queue (SQS) may be simpler
→ RabbitMQ isn't the best for high-throughput streaming or replay scenarios
