This project is a proof of concept (POC) using RabbitMQ and FastAPI. The goal is to demonstrate various use cases of RabbitMQ in combination with FastAPI. Each use case is separated into different folders for better organization and clarity.
simple-queue/
: Demonstrates a basic queue implementation using RabbitMQ and FastAPI.file-processor/
: Illustrates a file processing system with RabbitMQ and FastAPI.use-case-3/
: Description of the third use case....
: Additional use cases.
- Python 3.8+
- RabbitMQ server
- FastAPI
- Pydantic
- Uvicorn
-
Clone the repository:
git clone https://github.com/yourusername/rabbitmq-poc.git cd rabbitmq-poc
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required dependencies:
pip install -r requirements.txt
-
Start the RabbitMQ server:
sudo systemctl start rabbitmq-server
-
Navigate to the desired use case folder, for example,
simple-queue
:cd simple-queue
-
Run the FastAPI application using Uvicorn:
uvicorn main:app --reload
-
Access the API documentation at
http://127.0.0.1:8000/docs
.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or new use cases.
This project is licensed under the MIT License. See the LICENSE file for details.