RabbitMQ

RabbitMQ


RabbitMQ serves as a message broker, responsible for sending and receiving messages through queues.

RabbitMQ Components: -

·?????? Producer is in charge of sending messages

·?????? Consumer retrieves messages from the queue

·?????? Queue is a fundamental component of the message broker architecture, storing messages from producers and forwarding them to consumers.

Exchanges – Types: -

Messages aren’t directly pushed into queues. Instead, they pass through exchanges, which route messages to specific queues using keys or routes. Exchange types include:

  • Direct: Messages are routed based on the routing key
  • Topic: Routing key matches routing pattern via wildcards
  • Fanout: Messages are delivered to all bound queues regardless of the key
  • Headers: Similar to a topic exchange, but routing relies on header values.

?


RabbitMQ and server concepts

Some important concepts need to be described before we dig deeper into RabbitMQ. The default virtual host, the default user, and the default permissions are used in the examples, so let’s go over the elements and concepts:

  • Producer: Application that sends the messages.
  • Consumer: Application that receives the messages.
  • Queue: Buffer that stores messages.
  • Message: Information that is sent from the producer to a consumer through RabbitMQ.
  • Connection: A TCP connection between your application and the RabbitMQ broker.
  • Channel: A virtual connection inside a connection. When publishing or consuming messages from a queue - it's all done over a channel.
  • Exchange: Receives messages from producers and pushes them to queues depending on rules defined by the exchange type. To receive messages, a queue needs to be bound to at least one exchange.
  • Binding: A binding is a link between a queue and an exchange.
  • Routing key: A key that the exchange looks at to decide how to route the message to queues. Think of the routing key like an address for the message.
  • AMQP: Advanced Message Queuing Protocol is the protocol used by RabbitMQ for messaging.
  • Users: It is possible to connect to RabbitMQ with a given username and password. Every user can be assigned permissions such as rights to read, write and configure privileges within the instance. Users can also be assigned permissions for specific virtual hosts.
  • Vhost, virtual host: Provides a way to segregate applications using the same RabbitMQ instance. Different users can have different permissions to different vhost and queues and exchanges can be created, so they only exist in one vhost.

Ajith Ramawickrama

.Net Core | C# | Azure | JavaScript | Microservices | D365 | Solutions Architect | Team Lead | Mentor

1 年

A good summary on RabbitMQ. Keep writing

回复
jayamoorthi parasuraman

FSD|Azure|Cosmos, postgresql, docker,|AKS|DevOps|Dot.Net Core/.Net5/6/7/8 ||xunit,nunit, integration, graphQL,gRpc | EFCore|API |WCF| Angular/React |Microservices,DDD/TDD| Dapper | Sonar Mob: +919715783720/+6580537622

1 年

Nice

要查看或添加评论,请登录

Murugan K的更多文章

  • .NET Aspire

    .NET Aspire

    .NET Aspire is a cloud-native development stack for building distributed applications in .

    1 条评论
  • Deployment Slots

    Deployment Slots

    Azure Deployment Slots are a feature of Azure App Service (used for hosting web apps, mobile app backends, and APIs)…

  • Microservice - Circuit Breaker Pattern

    Microservice - Circuit Breaker Pattern

    A circuit breaker is a design pattern used in software development to improve the resilience and fault tolerance of…

    1 条评论
  • Docker

    Docker

    Docker is a containerization platform which packages your application and all its dependencies together in the form of…

    1 条评论
  • Strategy Design Pattern

    Strategy Design Pattern

    Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary…

    2 条评论
  • Playwright - Test (React)

    Playwright - Test (React)

    Playwright is an open-source test automation library initially developed by Microsoft contributors. It supports…

  • Deployment Groups

    Deployment Groups

    Deployment Groups In simple terms, a deployment group is a collection of machines (e.g.

  • Advanced Web Application Architecture

    Advanced Web Application Architecture

    This base application architecture helps to define the latest pattern.

    1 条评论
  • Clean Architecture

    Clean Architecture

    Clean architecture puts the business logic and application model at the center of the application. Instead of having…

  • Azure Notification Hub

    Azure Notification Hub

    Azure Notification Hubs provide an easy-to-use and scaled-out push engine that enables you to send notifications to any…