RabbitMQ 是一个流行的开源 message broker——它从生产者接收消息,并通过队列将其路由到消费者,在应用程序之间实现异步、解耦通信。它广泛用于任务队列、消息传递和连接服务。
RabbitMQ 是什么
RabbitMQ = a MESSAGE BROKER (middleware for messaging):
→ PRODUCERS send messages to RabbitMQ; CONSUMERS receive them
→ RabbitMQ ROUTES messages to the right queues and delivers them to consumers
→ implements messaging patterns (queues, pub/sub, routing) reliably
→ a reliable intermediary that decouples senders from receivers
RabbitMQ 的用途
✓ TASK / JOB QUEUES → offload work to background workers (process later, async)
✓ DECOUPLING services → services communicate via messages (independent, async)
✓ ASYNC processing → don't block; handle work in the background
✓ LOAD distribution → distribute tasks across multiple workers
✓ Pub/Sub, routing, request/reply → flexible messaging patterns between services
→ common in microservices, background processing, and integration
