{{Short description|Computer program module}} thumb|Sequence diagram for depicting the Message Broker pattern|400px A '''message broker''' (also known as an '''integration broker''' or '''interface engine'''<ref name="GartnerIB">{{cite web |url=https://www.gartner.com/it-glossary/ib-integration-broker |title=IB (integration broker) |work=IT Glossary |publisher=Gartner, Inc |accessdate=17 May 2018}}</ref>) is an intermediary computer program module that translates a message from the formal messaging protocol of the sender to the formal messaging protocol of the receiver. Message brokers are elements in telecommunication or computer networks where software applications communicate by exchanging formally defined messages.<ref name="GartnerIB" /> Message brokers are a building block of message-oriented middleware (MOM) but are typically not a replacement for traditional middleware like MOM and remote procedure call (RPC).<ref name="KaleGuide14">{{cite book |chapter-url=https://books.google.com/books?id=1IuZBQAAQBAJ&pg=PA117 |chapter=Integration Technologies |title=Guide to Cloud Computing for Business and Technology Managers: From Distributed Computing to Cloudware Applications |author=Kale, V. |publisher=CRC Press |pages=107–134 |year=2014 |isbn=9781482219227 |access-date=17 May 2018}}</ref><ref name="ClarkWeb13">{{cite book |chapter-url=https://books.google.com/books?id=2EonCgAAQBAJ&pg=PA71 |chapter=Integration Brokers and Web Services |title=Web Services Business Strategies and Architectures |author=Samtani, G. |author2=Sadhwani, D. |editor=Clark, M. |editor2=Fletcher, P. |editor3=Hanson, J.J. |display-editors=etal |publisher=Apress |pages=71–84 |year=2013 |isbn=9781430253563 |access-date=17 May 2018}}</ref>
==Overview== A message broker is an architectural pattern for message validation, transformation, and routing. It mediates communication among applications{{Vague|reason=Which apps? Web or desktop ones?|date=November 2021}}, minimizing the mutual awareness that applications should have of each other in order to be able to exchange messages, effectively implementing decoupling.<ref name="EjsmontWeb15">{{cite book |chapter=Asynchronous Processing |title=Web Scalability for Startup Engineers |author=Ejsmont, A. |publisher=McGraw Hill Professional |pages=275–276 |year=2015 |isbn=9780071843669}}</ref>
=== Purpose === The primary purpose of a broker is to take incoming messages from applications and perform some action on them. Message brokers can decouple end-points, meet specific non-functional requirements, and facilitate reuse of intermediary functions. For example, a message broker may be used to manage a workload queue or message queue for multiple receivers, providing reliable storage, guaranteed message delivery and perhaps transaction management.
=== Life cycle === The following represent other examples of actions that might be handled by the broker:<ref name="KaleGuide14" /><ref name="ClarkWeb13" />
*Route messages to one or more destinations *Transform messages to an alternative representation *Perform message aggregation, decomposing messages into multiple messages and sending them to their destination, then recomposing the responses into one message to return to the user *Interact with an external repository to augment a message or store it *Invoke web services to retrieve data *Respond to events or errors *Provide content and topic-based message routing using the publish–subscribe pattern
Message brokers are generally based on one of two fundamental architectures: hub-and-spoke and message bus. In the first, a central server acts as the mechanism that provides integration services, whereas with the latter, the message broker is a communication backbone or distributed service that acts on the bus.<ref name="ClarkWeb13" /> Additionally, a more scalable multi-hub approach can be used to integrate multiple brokers.<ref name="ClarkWeb13" />
== Real-time semantics == Message brokers that are purpose built to achieve time-bounded communications with end-to-end predictability allow for the development of real-time systems that require execution predictability. Frequently systems with real-time requirements involve interaction with the real world (robotics, vehicle automation, software-defined radio, et al.)
The Object Management Group Real-time CORBA specification provides a theoretical foundation for predictable communications technologies by levying the following requirements:<ref>{{cite web |url=https://www.omg.org/spec/RT/1.2/PDF |title=Real-time CORBA Specification |publisher=Object Management Group |date=2005-01-04 |at=section 1.3.4 on page 1-4<!-- page "one dash four", not pages 1 to 4 --> }}</ref>
<blockquote>For the purposes of this specification, "end-to-end predictability" of timeliness in a fixed priority CORBA system is defined to mean: * respecting thread priorities between client and server for resolving resource contention during the processing of CORBA invocations; * bounding the duration of thread priority inversions during end-to-end processing; * bounding the latencies of operation invocations.</blockquote>
==List of message broker software== *Amazon Web Services (AWS) [https://aws.amazon.com/amazon-mq/ Amazon MQ] *Amazon Web Services (AWS) [https://aws.amazon.com/kinesis/ Kinesis] *'''Apache''' **Apache ActiveMQ **[https://activemq.apache.org/components/artemis/ Apache Artemis] **Apache Camel **Apache Kafka **Apache Qpid **Apache Thrift **Apache Pulsar *Cloverleaf (Enovation Lifeline - NL) *Comverse Message Broker (Comverse Technology) *Coreflux [https://www.coreflux.org/ Coreflux MQTT Broker] *Eclipse [https://mosquitto.org/ Mosquitto MQTT Broker] (Eclipse Foundation) *EMQX [https://www.emqx.com/en/products/emqx EMQX MQTT Broker] *Enduro/X Transactional Message Queue (TMQ) *Financial Fusion Message Broker (Sybase) *Fuse Message Broker (enterprise ActiveMQ) *Gearman *Google Cloud [https://cloud.google.com/pubsub Pub/Sub] (Google) *HiveMQ [https://www.hivemq.com/hivemq/ HiveMQ MQTT Broker] *HornetQ (Red Hat) (Now part of Apache Artemis) *IBM App Connect *IBM MQ *JBoss Messaging (JBoss) *JORAM *[https://lavinmq.com LavinMQ] written in Crystal *Microsoft Azure Service Bus (Microsoft) *Microsoft BizTalk Server (Microsoft) *[https://migratorydata.com MigratoryData] (a publish/subscribe WebSockets message broker written to address the C10M problem <ref name="migratoryacm">{{cite book |last1=Rotaru |first1=Mihai |last2=Olariu |first2=Florentin |last3=Onica |first3=Emanuel |last4=Rivière |first4=Etienne |title=Proceedings of the 18th ACM/IFIP/USENIX Middleware Conference: Industrial Track |chapter=Reliable messaging to millions of users with migratorydata |display-authors=1 |date=December 2017 |pages=1–7 |doi=10.1145/3154448.3154449|arxiv=1712.09876 |isbn=9781450352000 |s2cid=35552786}}</ref>) *NATS (MIT License, written in Go) *NanoMQ [https://nanomq.io/ MQTT Broker for IoT Edge] *Open Message Queue *Oracle Message Broker (Oracle Corporation) *ORBexpress (OIS) **ORBexpress written in Ada **ORBexpress written in C# **ORBexpress written in C++ **ORBexpress written in Java *RabbitMQ (Mozilla Public License, written in Erlang) *Redpanda (implement Apache Kafka API, written in C++) *Redis An open source, in-memory data structure store, used as a database, cache and message broker *SAP PI (SAP AG) *SMC [http://www.smcsystem.ru/ SMC Platform] *Solace PubSub+ *Spread Toolkit *Tarantool, a NoSQL database, with a set of stored procedures for message queues *TIBCO Enterprise Message Service *WSO2 Message Broker *ZeroMQ
==See also== *Broker injection *Publish–subscribe pattern *MQTT *Comparison of business integration software *Message-oriented middleware
==References== {{reflist|1}}
Category:Message-oriented middleware Category:Middleware Category:Software design patterns