RabbitMQ ਦੇ ਲਚਕਦਾਰ exchanges ਅਤੇ bindings ਵਿਭਿੰਨ ਮੈਸੇਜਿੰਗ ਪੈਟਰਨ ਦਾ ਸਮਰਥਨ ਕਰਦੇ ਹਨ — work queues, publish/subscribe, routing, topics, ਅਤੇ request/reply (RPC)। ਇਹਨਾਂ ਪੈਟਰਨਾਂ ਨੂੰ ਸਮਝਣਾ RabbitMQ ਨੂੰ ਵੱਖ-ਵੱਖ ਸੰਚਾਰ ਲੋੜਾਂ ਲਈ ਵਰਤਣ ਦੀ ਕੁੰਜੀ ਹੈ।
Work queues (ਕਾਰਜ ਵੰਡ)
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 (ਪ੍ਰਸਾਰਣ)
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)
