What is message broker?
The message broker is an intermediate program that translates the language of a system over a telecommunications medium from one internationally suitable language to another.
In telecommunications networks, programs interact through the exchange of messages that are formally defined, that is, through the act of transmitting messages. In these networks, a message broker acts as an intermediary program that translates a message from the sender's formal message transfer protocol to the recipient's formal message transfer protocol. A message broker is also known as an integration broker or middleware.
Message brokers are architectural designs for validating, transforming, and routing messages. They serve as mid-level programs to trigger communication between applications. This helps to minimize the mutual awareness that the applications should have in order to be able to exchange messages by making efficient use of the decoupling.
The goal of message brokers is to receive incoming messages from applications and take action on them. Some examples of actions that a message broker might take are:
Direct messages to one or more destinations.
Translate messages into a different representation.
Communicate with another repository to improve or save a message.
Call web services to get data.
Responses to errors or events.
Offer content and topic-based message routing using the publish-subscribe pattern.
Perform message collection or aggregation; Breaking messages down into many different messages; Delivery of these messages to their desired destination; Recomposing the response messages into a single message and then returning them to the user.
Various messaging patterns, such as the publish-subscribe pattern, can work without using a message broker. Workload queues are one of those patterns that require a message broker. These are message queues that are managed by different recipients. These types of queues really should be supervised, handled, and generally reliably kept at a single point.