Skip to content

The RabbitMQ Booking App is a distributed application designed to facilitate the booking process by leveraging the messaging capabilities of RabbitMQ. It enables seamless communication between multiple components and systems involved in the booking workflow.

Notifications You must be signed in to change notification settings

N1k0l1n/RabbitMq-Booking-DotNet6

Repository files navigation

C# RabbitMQ Booking App

This is a C# application that utilizes RabbitMQ messaging system to handle bookings for a service.

Features

Sends booking requests to a RabbitMQ exchange Listens for booking confirmation messages from RabbitMQ queue Handles booking failures and retries Provides an easy-to-use API for integrating booking functionality into other applications Supports concurrent bookings for improved performance Prerequisites .NET Core SDK (version X.X or higher) RabbitMQ server installed and running

Installation

Clone the repository:

bash Copy code git clone https://github.com/your-username/csharp-rabbitmq-booking-app.git Navigate to the project directory:

bash Copy code cd csharp-rabbitmq-booking-app Build the solution:

Copy code dotnet build Configuration Open the appsettings.json file and update the following settings with your RabbitMQ configuration:

json Copy code { "RabbitMQ": { "Host": "localhost", "Port": 5672, "Username": "guest", "Password": "guest", "ExchangeName": "booking-exchange", "QueueName": "booking-queue", "RoutingKey": "booking" } }

Usage

Start the RabbitMQ server if it's not running.

Run the application:

arduino Copy code dotnet run This will start the booking application and it will begin listening for booking requests.

Integrate the booking functionality into your own application by sending a POST request to http://localhost:5000/api/booking with a JSON payload containing the booking details.

Example Request:

bash Copy code curl -X POST -H "Content-Type: application/json" -d '{ "name": "John Doe", "date": "2023-05-17", "time": "15:00", "service": "Massage" }' http://localhost:5000/api/booking The booking application will process the request and send a booking confirmation message to the RabbitMQ queue. You can implement a listener in your own application to receive and handle the confirmation message.

Contributing

Contributions are welcome! If you have any improvements or bug fixes, feel free to submit a pull request. Please make sure to follow the code style and write appropriate tests for new features.

License

This project is licensed under the MIT License.

Acknowledgments

Thanks to the creators of RabbitMQ for providing a reliable messaging system. Special thanks to the contributors of the libraries used in this application. Contact If you have any questions, you can reach me at [email protected].

Happy booking!

About

The RabbitMQ Booking App is a distributed application designed to facilitate the booking process by leveraging the messaging capabilities of RabbitMQ. It enables seamless communication between multiple components and systems involved in the booking workflow.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages