Welcome to the GraphQL Demo Message Consumer project! This repository demonstrates how to build a message consumer service that processes messages using RabbitMQ, and stores the results in a MongoDB database. The project follows clean architecture principles, ensuring maintainability and scalability.
- Message Consumption: Consumes messages from RabbitMQ, processes themGraphQL.
- MongoDB Storage: Stores the processed data in MongoDB, leveraging its NoSQL capabilities.
- Clean Architecture: Adheres to clean architecture principles, promoting separation of concerns and modularity.
- Dependency Injection: Uses dependency injection to manage services, enhancing testability and flexibility.
- .NET Core: The foundation of the application, providing a cross-platform framework.
- RabbitMQ: A message broker for processing and managing messages.
- MongoDB: A NoSQL database used for storing processed data.
- C#: The primary programming language used in the project.
- Dependency Injection: Ensures loose coupling and enhances testability.
- Clean Architecture: Organizes code into layers for better maintainability and scalability.
- .NET Core SDK 6.0 or later
- RabbitMQ server
- MongoDB instance
-
Clone the repository:
git clone https://github.com/wajid7511/GraphqlDemoMessageConsumer.git cd GraphqlDemoMessageConsumer
-
Configure the application:
Update the
appsettings.json
file with your RabbitMQ and MongoDB settings:{ "RabbitMQ": { "HostName": "your-rabbitmq-hostname", "QueueName": "your-queue-name", "UserName": "your-username", "Password": "your-password" }, "MongoDB": { "ConnectionString": "your-mongodb-connection-string", "DatabaseName": "your-database-name" } }
-
Restore dependencies and build the project:
dotnet restore dotnet build
-
Run the application:
dotnet run
- The service will automatically start consuming messages from RabbitMQ base on configuration.
- It will process each message.
- The processed data will be stored in the configured MongoDB database.
Contributions are welcome! If you'd like to contribute to this project, please fork the repository, make your changes, and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
- RabbitMQ for providing the messaging backbone.
- GraphQL for enabling flexible and efficient data querying.
- MongoDB for its powerful NoSQL database platform.
This project is a solid foundation for building scalable and efficient message-driven applications using .NET Core, RabbitMQ, GraphQL, and MongoDB. Explore, experiment, and expand it to fit your needs!