https://github.com/matthew-shaw/rabbit-stew
RabbitMQ Experiments
https://github.com/matthew-shaw/rabbit-stew
amqp broker consumer docker docker-compose event events exchange flask gunicorn messaging pika producer publisher python queue queueing queues rabbitmq
Last synced: 8 months ago
JSON representation
RabbitMQ Experiments
- Host: GitHub
- URL: https://github.com/matthew-shaw/rabbit-stew
- Owner: matthew-shaw
- License: mit
- Created: 2024-07-01T07:51:39.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-29T11:55:38.000Z (about 1 year ago)
- Last Synced: 2025-01-03T04:20:36.434Z (9 months ago)
- Topics: amqp, broker, consumer, docker, docker-compose, event, events, exchange, flask, gunicorn, messaging, pika, producer, publisher, python, queue, queueing, queues, rabbitmq
- Language: Python
- Homepage:
- Size: 86.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RabbitMQ Experiments
This experiment demonstrates:
- Using the Pika library for Python to create a RabbitMQ client, used by producers and consumers
- Secure connections using mutual SSL authentication over TLS between three segregated networks
- A direct exchange with routing keys used to bind queues for consumers
- Multiple consumers receiving messages from shared queues using round-robin dispatching and prefetching, to parrallelise work
- Consumer Acknowledgements and Publisher Confirms for increased data safety
- Durable queues and persistent messages for increased fault tolerance
- Python type annotations and checking using mypy
- Container scaling using Docker Compose for local development## Getting started
```bash
docker compose up --build
```## Design
```mermaid
flowchart TB
client(Client)
subgraph Docker compose
subgraph Producer network
P((Producer)):::P
endsubgraph Broker network
X{{Chores}}:::X
Q1[[parents_tasks]]:::Q
Q2[[kids_tasks]]:::Q
end
subgraph Consumer network
C1((Parent A)):::C
C2((Parent B)):::C
C3((Kid A)):::C
C4((Kid B)):::C
end
endclient -- http --> P
P -- amqps --> X
X -- parents --> Q1
X -- kids --> Q2
Q1 -- amqps --> C1 & C2
Q2 -- amqps --> C3 & C4classDef P fill:#DAE8FC,stroke:#6C8EBF,stroke-width:2px
classDef X fill:#F8CECC,stroke:#B85450,stroke-width:2px
classDef Q fill:#FFF2CC,stroke:#D6B656,stroke-width:2px
classDef C fill:#D5E8D4,stroke:#82B366,stroke-width:2px
```