Exchange dan binding RabbitMQ yang fleksibel menyokong pelbagai corak pemesejan — work queue, publish/subscribe, routing, topic, dan request/reply (RPC). Memahami corak-corak ini adalah kunci untuk menggunakan RabbitMQ bagi keperluan komunikasi yang berbeza.
Work queue (pengagihan task)
WORK QUEUE → distribute tasks among multiple WORKERS (competing consumers):
→ producer → queue → multiple consumers (each message to ONE worker) → parallel processing
→ for: distributing background work; scaling task processing
Publish/Subscribe (siaran)
PUB/SUB → broadcast a message to MULTIPLE consumers (each gets a copy):
→ FANOUT exchange → every bound queue gets the message → all consumers receive it
→ for: broadcasting events to all interested parties (notifications, updates)
