Giter VIP home page Giter VIP logo

async-pubsub-nosql's Introduction

PubSub System with RabbitMQ, MassTransit and MongoDB

This project consists of a Publish-Subscribe (PubSub) system that utilizes RabbitMQ as a message broker for asynchronous communication between two applications: the Publisher (Hangfire) and the Consumer. The Consumer uses MassTransit to read messages in batch and performs bulk insertion operations into MongoDB.

Technologies

  • .NET 8.0
  • RabbitMQ
  • MassTransit
  • Hangfire (InMemory)
  • MongoDB
  • Docker

Functionality

The system operates as follows:

  1. Publisher (Hangfire): A Hangfire recurring Job that is responsible for sending 5000 messages every 20 seconds to RabbitMQ on a specific topic.
  2. RabbitMQ: Acts as the message broker, receiving messages from the Publisher and forwarding them to interested Consumers.
  3. Consumer: Uses MassTransit to consume messages from RabbitMQ in batch.
  4. MongoDB: The Consumer processes the batch of messages and performs bulk insertion operations into MongoDB.

Components

  • Publisher: An application that generates and sends messages to RabbitMQ.
  • Consumer: An application that consumes messages from RabbitMQ, processes them, and performs operations on MongoDB.

Architecture Diagram

Architecture Diagram

Execution

  • Just run the docker-compose file on the root folder to raise the containers of Publisher, Consumer, MongoDB and RabbitMQ.
  • Ensure that RabbitMQ is running and that all configurations are correct before starting the Publisher and Consumer services.

async-pubsub-nosql's People

Contributors

ruhtar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.