Installation and debugging of Message Queuing ZEROMQ

Source: Internet
Author: User
Tags rabbitmq

In recent days, development to interprocess communication, find out, feel most appropriate or message queue, below is about message queue Zeromq installation debugging method.

I. Introduction of ZeroMQ

is a simple and easy-to-use transport layer, like the framework of a socket library, he makes the socket programming simpler, more concise and higher performance. is a message processing queue library that can elastically scale between multiple threads, cores, and host boxes. ZMQ's clear goal is to "become part of the standard network protocol stack and then into the Linux kernel". They are not yet seen to be successful. However, it is undoubtedly a very promising and a layer of encapsulation on the "traditional" BSD sockets that people need most. ZMQ makes writing high-performance Web applications extremely simple and fun. The

In recent years, about the "Message Queue" projects in endless, well-known there are more than 10, mainly because of the post-Moore Law era, distributed processing has become the mainstream, the industry needs a set of standards to solve the distributed computing environment among the nodes of the message communication. Years of competition, the Apache Foundation's amqp/1.0-compliant RabbitMQ has been widely recognised as a leading MQ project.

Compared with RabbitMQ, ZMQ is not a traditional Message Queuing server, in fact, it is not a server at all, it is more like a low-level network communication library, on the Socket API to do a layer of encapsulation, the network communication, process communication and thread communication is abstracted into a unified API interface .

II, ZMQ definition

read ZMQ   After a series of interfaces similar to sockets, he The difference between sockets is: the normal socket is end-to-end (1:1 relationship), and ZMQ can be n:m relationship, people know more about BSD sockets is the point-to-point connection, point-to-point connection needs to explicitly establish a connection, destroy the connection, select the Protocol (tcp/ UDP) and processing errors, while ZMQ masks these details, making your network programming easier. ZMQ is used for the communication between node and node, which can be either a host or a process.

Third, the purpose of this article

In the process of providing services to the cluster, we have many configurations that need to be updated whenever necessary, so what if this information is pushed to each node? and ensure the consistency and reliability of information? Based on the introduction of the basic theory of ZMQ, this paper attempts to implement a distribution center using ZMQ. From a node, the information is distributed to each server node without errors, and the correctness and consistency of information is ensured.

In addition, as a buffer for SCADA system control and configuration, it is better to realize SCADA function and complete the development task.

Iv. three basic models of ZMQ

ZMQ provides three basic communication models, namely " Request-reply "," publisher-subscriber "," Parallel Pipeline ", we have a glimpse of ZMQ from these three modes.

five

5.1 Installing dependent libraries

The latest development library relies on this library sudo apt-get install libsodium*

5.2 Compiling and installing

ZEROMQ Download

./configuremake-j4make Install

5.3 Installation path:

Header file:/usr/local/include

Library files:/usr/local/lib

Can be included in the relevant development environment. can be used.

This article from "LINUXQT Jinan high-tech Zone" blog, please be sure to keep this source http://qtlinux.blog.51cto.com/3052744/1699012

Installation and debugging of Message Queuing ZEROMQ

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.