Zeromq, the fastest message queue in history

Source: Internet
Author: User

Zeromq regards communication needs as four types, one of which is one-to-one pair communication, which is used to support the traditional TCP socke model, but is not recommended.
There are only three common communication modes:
1. Request Response model. The requester initiates a request and waits for the response to respond to the request. From the perspective of the request end, it must be a pair of sending and receiving pairs;
On the other hand, it must be a sending and receiving pair on the response side. Both the request end and response end can be a 1: n model. Generally, 1 is considered as the server, and N is considered as the client.
0mq can well support the routing function (the component that implements the routing function is called device), and 1: N is extended to N: m (only several routing nodes need to be added ).
From this model, the underlying endpoint address is hidden from the upper layer. Each request has an implicit response address, and the application does not care about it.
 
2. Publish and subscribe model. In this model, the publisher only sends data in one direction, and does not care whether to send all the information to the subscriber.
If the subscription end is not connected when the publisher starts to publish information, the information is directly discarded.
However, once the subscription end is connected, no information is lost in the middle.
Likewise, the subscriber is only responsible for receiving and not for feedback.
If the publisher and the subscriber need to interact with each other (for example, to confirm whether the subscriber is connected), use an additional socket to meet this requirement using the request response model.
 
3. MPS queue model. In this model, the pipeline is unidirectional, and the push data stream from the push end is unidirectional to the pull end.

Zeromq, the fastest message queue in history

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.