πŸ“¨ Message Broker

GunhoΒ·2025λ…„ 1μ›” 5일

πŸ“¨ Message Broker

πŸ“¨ Message Broker is a software that enables communication across systems, applications and services.

Message Broker was devised to enable MSA, and functions as a middleware component for asynchronous communication.

Geeks for Geeks Available at here


Message Broker offers the underneath features:

⛓️‍πŸ’₯ Decoupling

  • a monolith architecture to MSA.

  • in REST API, a sender and the receivers had to know each other (high coupling), but in message broker a sender may not have to know about the receivers and vice versa (low coupling).

  • can be designed to work like REST API as well.

πŸ™ Scalability

  • following MSA, any server instances can be either temporarily or permanently appended under high traffics.

πŸ›‘ Fault Tolerance

  • guarantees the order of the queued messages (Queue FIFO).

  • prevents message loss or damages by acknowledgements from the consumers.


πŸ•‹ Message Broker Model

Message Broker offers two basic messaging patterns or models which are:

  • πŸ‘‰ Point to Point Messaging
  • πŸ“­ Publish/Subscribe Messaging

πŸ‘‰ Point to Point Messaging

Point-to-point messaging is a distribution model used in message queues where each message has a single sender and a single recipient. In this approach, a message is delivered to only one consumer and is processed just once.

🌍 Real World

Point-to-point messaging is ideal for scenarios where a task needs to be performed only one time per message. Typical use cases include processes like payroll or financial transactions, where it is critical to ensure that each payment or operation is handled precisely once.


πŸ“­ Publish/Subscribe Messaging

In the publish/subscribe (pub/sub) messaging model, messages are published to a specific topic by a producer, and multiple consumers can subscribe to that topic to receive relevant messages. Each message published to a topic is delivered to all subscribers, creating a broadcast-type system with a one-to-many relationship between the sender and the recipients.

🌍 Real World

Publish/Subscribe Messaging is well-suited for situations where information needs to be distributed to multiple parties simultaneously. For example, in an airline operation, updates on flight landing times or delays could be shared with various stakeholders such as ground crews, baggage handlers, pilots, flight attendants, and display operators responsible for informing passengers. The pub/sub model ensures that all interested parties receive the necessary updates in real-time.


πŸ‡ RabbitMQ

πŸ‡ RabbitMQ

RabbitMQ Available at here


aa


πŸ“š References

IBM
RabbitMQ
Geeks for Geeks

profile
Hello

0개의 λŒ“κΈ€