开发者

What is message-oriented middleware?

I've been trying to figure out exactly what message-oriented middleware is, but haven't been able to find any non-enterprise real world examples that make sense to me. Can anyone give me a clear and easily understandable explanation of what MOM is, and possibly some si开发者_C百科mple examples of how it's used outside of enterprise?


Message-oriented middleware is a kind of infrastructure that uses message exchange rather than function calls / shared memory. It's a design principle, and as a result can be used anywhere. It's probably most useful in heterogeneous / high availability / high performance systems.


As I have just answered a somewhat similar question - I'd like to answer yours, but with few extra terminologies, in the end to clarify what MOM is in a practical way. Here are few plain English definition of few components (as the more you dig into MOM, these terms will come again and again eventually - and also the question is tagged rabbitmq):

  • MOM - is an approach, an architecture for distributed system i.e. a middle layer for the whole distributed system, where there's lot of internal communication (a component is querying data, and then needs to send it to the other component, which will be doing some processing on the data) so components have to share info/data among them.
  • Message broker - is any system (in MOM) with handles messages, or to be more precise which routes messages to the specific consumer/recipient. A Message Broker is typically built upon a MOM. The MOM provides the base communication among the applications, and things like message persistence and guaranteed delivery. "Message brokers are a building block of Message oriented middleware."
  • Rabbitmq - a message broker; a MOM implementation; an open-source implementation of AMQP; as per Wikipedia:

    RabbitMQ is an open source message broker software (sometimes called message-oriented middleware) that implements the Advanced Message Queuing Protocol (AMQP).

I have mentioned Rabbitmq here, to further clarify MOM, in way it's been in use around us.


Message-Oriented-Middleware - is an approach, an architecture for distributed system i.e. a middle layer for the whole distributed system, where there's lot of internal communication so components have to share info/data among them, for example - a component is querying data, and then needs to send it to the other component, which will be doing some processing on the data. In short it's a way to design a system, and yes, depending upon the overall requirements i.e. we will be developing a distributed system, with some internal communication. The biggest advantage of MOM architecture/decision is decoupling of the components i.e. if we're going to change the data query component it'll have no effect on the data processing components, as they're communicating via MOM (e.g. Rabbitmq Cluster) - the data processing component is getting the data in form messages.

MOM at the end is just a design decision, that we use a middleware for gluing our system (distributed) components, a middleware for handling communication between them, in the form of messages (i.e. JSON).


A much relevant SO question and answer - Message broker vs. MOM (Message-Oriented Middleware)


Message-oriented middleware is a framework system for sending and receiving messages on computer and data networks. Middleware messaging provides the base for Broker, application servers, and business process automation.

See nice sketch that explains it http://www.onlinemq.com/wiki/index.php/Image:Flow-diagram.jpg


In short

Message Oriented Middleware (MOM): The purpose of Message Oriented Middleware (MOM) is to make incompatible or otherwise very different applications/systems/platforms (endpoints) able to communicate in a shared format.

The primary components used for messaging

How does the applications on the systems talk to the middleware software?

Message Queue Interface (MQI): This is an API that have different function (calls) that makes the business application able to communicate with a queue manager (QM).

How does the systems send messages between them?:

Message Queueing (MQ): Communication is done by sending/recieving messages (data) to queues rather than directly to the sending/recieving application/system.

Note: There a multiple types of queues that serves different operations before/after a message can be sent/recieved.

Broker: The broker translates these messages between the application/system.

Queue Manager (QM): This manages the queues and communicates with other queue managers on different systems, so that a message from queue(A) on system A will be sent and put on queue(B) on system B.

Message Channels: The queue manager communicates with the other queue managers through a message channel.

Check out the technical explanations from IBM's version of MOM: https://www.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.pro.doc/q002620_.htm

Check out this channel - It has solid concise down to earth explanations about this subject.

https://www.youtube.com/watch?v=5-0sv-sRmGw&list=PLqnWYrfCqvm5ZdT4je7vjdyLf9_dPK6Kc&index=33


Using MOM messages are sent to the client are collected and stored till they are acted upon, while client continues other process.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜