Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 567 Bytes

File metadata and controls

39 lines (26 loc) · 567 Bytes

RabbitMQ Examples

Usage

Start RabbitMQ

docker-compose up -d

Basic: send and receive

Consumers connected to a single message queue receive messages in a round-robin fashion.

# terminal 1
python basic_sender.py

# terminal 2
python basic_receiver.py

# terminal 3
python basic_receiver.py

Fanout: send and receive

When using a fanout type exchange, all consumers receive the same messages.

# terminal 1
python fanout_sender.py

# terminal 2
python fanout_receiver.py

# terminal 3
python fanout_receiver.py