Skip to content

Demonstates Event Driven Microservice Messaging. #Dotnet8 #RabbitMq #Masstransit #Docker

License

Notifications You must be signed in to change notification settings

alikrc/MicroServiceMessaging

Repository files navigation

MicroServiceMessaging

This project demonstrates Event Driven Microservice Messaging. The architecture involves two key events: ArticleCreatedEvent and ArticleViewedEvent.

Overview

Events

  • ArticleCreatedEvent: Triggered when an article is created.
  • ArticleViewedEvent: Triggered when an article is viewed.

Services

  1. CreateArticle Service:

    • Functionality: Allows users to create new articles.
    • Event: Publishes ArticleCreatedEvent upon article creation.
  2. Newsletter API:

    • Functionality: Retrieves article information.
    • Event: Publishes ArticleViewedEvent when an article is accessed.

Consumers

  1. ArticleCreatedConsumer:

    • Consumes ArticleCreatedEvent.
    • Action: Writes article creation data to the database.
  2. ArticleViewedConsumer:

    • Consumes ArticleViewedEvent.
    • Action: Logs article view information to the database.

How It Works

  1. Article Creation:

    • User creates an article via the CreateArticle service.
    • This triggers ArticleCreatedEvent.
    • The ArticleCreatedConsumer processes this event and stores the data in the database.
  2. Article Viewing:

    • User views an article via the Newsletter API.
    • This triggers ArticleViewedEvent.
    • The ArticleViewedConsumer processes this event and logs the view in the database.

Technologies Used

  • .NET for backend development.
  • Event-driven architecture for scalable and decoupled service communication.
  • Message brokers (e.g., RabbitMQ, Kafka) for event handling.

Getting Started

  1. Clone the repository:
    git clone https://github.com/alikrc/MicroServiceMessaging.git
  2. Set up the necessary environment variables and configuration files.
  3. Build and run the services using your preferred method (e.g., Docker, .NET CLI).

Future Enhancements

  • Implement additional events for more granular tracking.
  • Add more consumers for advanced processing and analytics.
  • Integrate with a front-end application for a complete user experience.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes. License

This project is licensed under the MIT License. See the LICENSE file for details.

image

image

image

image

About

Demonstates Event Driven Microservice Messaging. #Dotnet8 #RabbitMq #Masstransit #Docker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published