Zeromq-a lightweight messaging component

Source: Internet
Author: User

Zeromq is a lightweight messaging component. Although its name contains "MQ", zeromq is not "Message Queue/Message Middleware" strictly speaking ". Zeromq is a transport-layer api library that focuses more on message transmission. Compared with message queues, zeromq has the following features:

Point-to-point without intermediate node

Traditional message queues require a Message Server to store and forward messages. Zeromq gave up this mode, focused on point-to-point message transmission, and (attempted) achieved the ultimate. The Message Server is eventually converted to point-to-point message transmission from the server to other nodes. Zeromq can cache messages, but it is cached at the sending end. Zeromq has an Interface related to water level settings to control the cache volume. Of course, zeromq also supports traditional message queues (implemented through zmq_device ).

Message sending and receiving mode

In point-to-point message transmission, zeromq summarizes the communication modes, such as common subscription modes (one message is sent to multiple customers) and distribution modes (N messages are evenly distributed to X customers) and so on. The following are currently supported message mode pairs. Either party can act as the server. Flexible.

? Supports multiple underlying communication modes with a unified interface

Whether inter-thread communication, inter-process communication, or cross-host communication, zeromq uses the same set of APIS for calling. You only need to change the name of the communication protocol (for example, from "IPC: /// XXX "to" TCP ://.... It provides the following four types of transmission protocols:

  • TCP: Communication Between Hosts
  • Inroc: communication between threads of the same process)
  • IPC: Communication Between processes on the same host
  • PGM: Multicast Communication

? Asynchronous, emphasizing performance

Zeromq was designed to serve high-performance message sending, so it is designed to be concise and efficient. It sends messages in asynchronous mode and is implemented by a separate Io thread. Its performance often makes it difficult for other message queue frameworks to look back.

Learning documents:

The following two C # introductory documents are well described. We recommend them here.

  1. One article on codeproject is very good: zeromq via C #: introduction, which is also translated in China: Use zeromq through C.
  2. This blog is also very easy-to-understand and easy to understand.
  3. The official zeromq Guide also has a detailed Chinese version, which is also available on csdn: Click to download

Zeromq-a lightweight messaging component

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.