I have developed this application using .NET 8, RabbitMQ and PostgreSQL. It consists of two console applications: a producer app that sends messages to the queue, and a consumer app that reads the messages from the queue and stores them in a PostgreSQL database.
Before running this application, make sure you have the following installed:
- RabbitMQ server
- .NET 8
- PostgreSQL database
-
Clone this repository:
git clone https://github.com/iliass-de/DotNet-RabbitMQ.git -
Install the required dependencies:
for each application run the following commnand
dotnet build
-
Update the configuration file
appsettings.jsonwith the appropriate settings for your RabbitMQ server and PostgreSQL database. -
Run the migration within the consumer app:
dotnet ef database update
-
Start the producer application:
dotnet run -
The producer app will connect to RabbitMQ and ask for user inputs.
-
Start the consumer application:
dotnet run -
The consumer app will connect to RabbitMQ, read messages from the queue, and store them in the PostgreSQL database.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
