zeromq

Class ZMQContext not found

回眸只為那壹抹淺笑 提交于 2020-01-02 10:33:08
问题 I'm running web server on nginx 1.4.6 and php 5.5 inside a virtualized machine with Ubuntu 14.04 and need to install ZeroMQ extension. I have followed the instructions on ZMQ (the section To build on UNIX-like systems ), added php language binding as instructed here, compiled it against my version of php and added the line extension=zmq.so to /etc/php5/cli/php.ini as well as to /etc/php5/fpm/php.ini , which are my only .ini files. After restarting nginx and php-fpm the php -i shows following:

ZeroMQ multithreading: create sockets on-demand or use sockets object pool?

被刻印的时光 ゝ 提交于 2020-01-02 08:33:10
问题 I'm building a POC leveraging ZeroMQ N-to-N pub/sub model. From our app server, when a http request is serviced, if the thread pulls data from the database, it updates a local memcache instance with that data. To synchronize other memcache instances in the app server cluster, the request thread sends a message with the data using a ZMQ publisher...so the question is: What strategy is the most effective with respect to minimizing socket create/destory overhead when the application has many

Dynamic Scalable and adaptive architecture

混江龙づ霸主 提交于 2020-01-02 07:42:10
问题 I am a PhD student in Cloud Computing, I plan to use the microservices based architecture with consul and zeromq for my research project. I had few questions that I am finding hard to understand. Can someone help me out in sharing their experience. We have microservices based on dockers, We have zeromq and we have consul. Can you mention how we could combine all the three together to have a dynamic adaptive environment? Though I understand as to what zeromq, docker and consul is individually,

Why does TCP/IP on Windows7 take 500 sends to warm-up? ( w10,w8 proved not to suffer )

情到浓时终转凉″ 提交于 2020-01-02 02:19:07
问题 We are seeing a bizarre and unexplained phenomenon with ZeroMQ on Windows 7 , sending messages over TCP. ( Or over inproc , as ZeroMQ uses TCP internally for signalling, on Windows ). The phenomenon is that the first 500 messages arrive slower and slower, with latency rising steadily. Then latency drops and messages arrive consistently rapidly, except for spikes caused by CPU/network contention. The issue is described here: https://github.com/zeromq/libzmq/issues/1608 It is consistently 500

ZeroMQ Usage of publish-Subscribe pattern in different networks, behind NAT/firewalls

核能气质少年 提交于 2020-01-01 20:02:02
问题 Does Publish-Subscribe method work if: publisher and subscribers are in different networks (I've checked once - it works) subscribers are behind NAT\firewall In both cases packet routing works correctly. As I understand PUB\SUB uses the same TCP transport, so if PUB\SUB doesn't work so standard windows winsock doesn't work too? Is PUB\SUB proxy (like that http://zguide.zeromq.org/page:all#toc34) needed if packet routing mechanism is undefined only? 回答1: I've found some code uses PUB\SUB model

ZeroMQ Usage of publish-Subscribe pattern in different networks, behind NAT/firewalls

只谈情不闲聊 提交于 2020-01-01 19:59:50
问题 Does Publish-Subscribe method work if: publisher and subscribers are in different networks (I've checked once - it works) subscribers are behind NAT\firewall In both cases packet routing works correctly. As I understand PUB\SUB uses the same TCP transport, so if PUB\SUB doesn't work so standard windows winsock doesn't work too? Is PUB\SUB proxy (like that http://zguide.zeromq.org/page:all#toc34) needed if packet routing mechanism is undefined only? 回答1: I've found some code uses PUB\SUB model

How to have limited ZMQ (ZeroMQ - PyZMQ) queue buffer size in python?

断了今生、忘了曾经 提交于 2020-01-01 19:00:08
问题 I use pyzmq library with pub/sub in python . I have some rapid ZMQ publisher by .connect() method script and a slower ZMQ subscriber by .bind() method script. Then after few minutes my subscriber gets old published data from publishers ( due ZMQ buffer ). My Question: Is there an approach to manage ZMQ queue buffer size? (set a limited buffer) Note : I don't want to use ZMQ PUSH/PULL. Note : I've read this post, but this approach clear buffer only: clear ZMQ buffer Note : I tried with high

Retrieving subscriber count using zeromq PUB/SUB sockets

折月煮酒 提交于 2020-01-01 08:48:26
问题 Is it possible to get the total count of subscribers from a PUB socket in zeromq? Thanks! 回答1: Yes, but unfortunately not via any simple property or method. You need to use the zmq_socket_monitor() function to connect an inproc service socket to the main socket you want to observe. From there you can listen to events regarding connect/disconnect and keep your own count of subscribers. It may not be a trivial task though, since it seems (to me at least) a bit hard to know when to consider a

ZeroMQ实例

我的未来我决定 提交于 2019-12-31 17:26:50
使用库版本 zeromq-4.0.3 接收端代码 #include <zmq.h> #include "stdio.h" int main(int argc, char * argv[]) { void * pCtx = NULL; void * pSock = NULL; const char * pAddr = "tcp://*:7766"; //创建context,zmq的socket 需要在context上进行创建 if((pCtx = zmq_ctx_new()) == NULL) { return 0; } //创建zmq socket ,socket目前有6中属性 ,这里使用dealer方式具体使用方式请参考zmq官方文档 if((pSock = zmq_socket(pCtx, ZMQ_DEALER)) == NULL) { zmq_ctx_destroy(pCtx); return 0; } int iRcvTimeout = 5000;// millsecond //设置zmq的接收超时时间为5秒 if(zmq_setsockopt(pSock, ZMQ_RCVTIMEO, &iRcvTimeout, sizeof(iRcvTimeout)) < 0) { zmq_close(pSock); zmq_ctx_destroy(pCtx); return 0; }

Is jeromq production ready?

↘锁芯ラ 提交于 2019-12-31 12:32:16
问题 I've used ZeroMQ in the past with with JVM applications via the jzmq library. I am planning on using zeromq on a new project where some of the services are implemented on the JVM. I just discovered jeromq, a pure java implementation of zeromq, and I would like to use it mostly since it is tracking zeromq 3.x and it removes the headache of dealing with jzmq . However, I can't tell from the repo page if it is production ready. Does anyone have experience with jeromq in production? 回答1: As the