https://github.com/chenxu2394/ticketsystem-rabbitmq
An example implementation of a distributed, asynchronous messaging system for an amusement park ticketing application using RabbitMQ.
https://github.com/chenxu2394/ticketsystem-rabbitmq
asynchronous-messaging backend cloudcomputing distributed-systems eventdrivenarchitecture rabbitmq
Last synced: 9 months ago
JSON representation
An example implementation of a distributed, asynchronous messaging system for an amusement park ticketing application using RabbitMQ.
- Host: GitHub
- URL: https://github.com/chenxu2394/ticketsystem-rabbitmq
- Owner: chenxu2394
- Created: 2024-01-04T02:33:30.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-04T03:28:57.000Z (over 2 years ago)
- Last Synced: 2025-06-03T20:43:53.049Z (about 1 year ago)
- Topics: asynchronous-messaging, backend, cloudcomputing, distributed-systems, eventdrivenarchitecture, rabbitmq
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RabbitMQ Amusement Park Ticketing System
This repository contains my implementation of an asynchronous messaging system for an amusement park ticketing application, using RabbitMQ. This project is part of an assignment I completed for the Cloud Software and Systems course offered by the Department of Computer Science at Aalto University. It focuses on building distributed systems with asynchronous messaging principles.
## Project Overview
The application simulates an amusement park ticketing system, comprising of three main components:
- **Ticket Machine (TicketEventProducer)**: Simulates customers tapping their phone to issue ticket events.
- **Ticket Worker (TicketWorker)**: Processes ticket events by verifying customer details and ride prices, and then notifying the customers.
- **Customer App (CustomerEventConsumer)**: Receives notifications about ticket processing for individual customers.
## Message Flow Diagram
```mermaid
flowchart TD
A(Ticket Machine) -->|Direct Exchange| B[Worker Queue]
B --> |Invalid|Z[Dead Letter Exchange]
B --> |Valid| C{ }
C --> Y[Worker 1]
C --> X[Worker 2]
X --> D[Topic Exchange]
Y --> D[Topic Exchange]
D --> E(Customer App)
```
## System Architecture
```mermaid
sequenceDiagram
participant TM as Ticket Machine
participant TW as Ticket Worker
participant CA as Customer App
participant RMQ as RabbitMQ Broker
TM->>RMQ: TicketEvent
RMQ->>TW: Forward TicketEvent
TW->>TW: Process Event
TW->>RMQ: CustomerEvent
RMQ->>CA: Forward CustomerEvent to relevant Customer