Installing ZEROMQ
wget http://download.zeromq.org/zeromq-4.0.5.tar.gz
TAR-ZXVF zeromq-4.0.5.tar.gz
CD zeromq-4.0.5
CD foreign/openpgm/
TAR-ZXVF libpgm-5.2.122~dfsg.tar.gz
./configure--PREFIX=/DATA/KLJ/ZEROMQ--WITH-PGM=LIBPGM-5.2.122~DFSG
Make
Make install
Installing the PHP-ZMQ Extension
git clone git://github.com/mkoppanen/php-zmq.git
CD PHP-ZMQ
/data/klj/php/bin/phpize
./configure--with-php-config=/data/klj/php/bin/php-config--with-zmq=/data/klj/zeromq
Make && make install
Modify PHP.ini Restart
Error Configure:error:Please Reinstall the Pkg-config distribution
wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz
TAR-ZXVF pkg-config-0.28.tar.gz
CD pkg-config-0.28
./configure--with-internal-glib
Make && make install
ZMQ (hereinafter referred to as ZMQ) is a simple and easy to use transport layer, like the framework of a socket library, he makes socket programming simpler, more concise and higher performance. is a message processing queue library that can elastically scale across multiple threads, cores, and host boxes. ZMQ's clear goal is to "become part of the standard network protocol stack and then enter the Linux kernel
Feature Introduction:
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, a layer of encapsulation on the Socket API, the network communication, process communication and thread communication abstraction into a unified API interface
Disadvantages:
ZEROMQ does not support message persistence and is prone to loss of data.
Supports 3 modes:
1. Hello World
Single-Queue mode
2, Publish-subscribe
Subscription mode
3. PipeLine model
If we need to count the logs of each machine, we need to distribute the statistical task to each node machine, collect the statistic result, make a summary
Reference blog:
Http://www.linuxde.net/2013/05/13647.html
ZMQ API Reference Manual: http://api.zeromq.org/
PHP User's Manual can be consulted: Http://zguide.zeromq.org/php:all
ZEROMQ's study and research: http://www.searchtb.com/2012/08/zeromq-primer.html
ZMQ PHP Programming Reference manual: Http://php.zero.mq (unreachable)
ZeroMQ, the fastest message Queue-–ZMQ study and research in history http://news.cnblogs.com/n/154000/
Here are a number of examples of programs to refer to: https://github.com/imatix/zguide
ZEROMQ Installation---PHP-ZMQ