Message-oriented middleware has developed rapidly since its generation. In a distributed online transaction processing environment, it acts as a Communication Resource Manager (CRM, provides real-time, efficient, and reliable messaging services for distributed applications that span different operating systems and networks. At the same time, message-oriented middleware reduces the number of cross-platform applications.ProgramComplexity. In a system that requires reliable transmission, message-oriented middleware can be used as a communication platform to provide reliable transmission functions for applications to transmit messages and files.
Message-oriented middleware (MOM) has two transmission models: point-to-point (PTP) and publish-subscribe (pub/Sub ).
1. Point-to-Point model (PTP)
The point-to-point model is used for point-to-point communication between message producers and consumers. The message producer initiates a message to a specific consumer identified by a name. This name actually corresponds to a queue in the message service. It is stored in this queue before the message is sent to the consumer. The queue can be persistent to ensure that messages are still transmitted when the message service fails.
2. Publish-subscribe model (pub/Sub)
The publishing-subscription model uses a content hierarchy called a topic to replace the unique destination in the PTP model and send applications to publish their own messages, it indicates that the message describes a topic in the layered structure. Applications that want to receive these messages subscribe to this topic. The subscriber of a topic in the subtopic hierarchy can receive all messages of the topic and its subtopic.
Server design class diagram:
Client design class diagram:
References:
Introduction to message-oriented middleware principles and JMS