zeromq

No jzmq in java.library.path

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 05:42:27
I work on a trading engine where at the time of run, I get the log from the engine.log like the following, 2018_01_02_03_28_20_684 INFO ZMQCommunicatorService REMOTE_EXECUTOR_MARKET_ADMIN-ALL_MARKETS-0-5 - no jzmq in java.library.path, sleeping 2 minutes then try again 2018_01_02_03_28_20_697 INFO ZMQCommunicatorService ENGINE_MARKET_ADMIN-ALL_MARKETS-0-4 - Could not initialize class org.zeromq.ZMQ, sleeping 2 minutes then try again 2018_01_02_03_30_20_696 INFO ZMQCommunicatorService REMOTE_EXECUTOR_MARKET_ADMIN-ALL_MARKETS-0-5 - Could not initialize class org.zeromq.ZMQ, sleeping 2 minutes

What do I need to do to get ZMQ_RADIO / ZMQ_DISH to work properly?

社会主义新天地 提交于 2019-12-06 05:25:41
I'm attempting to use the ZMQ draft specs ZMQ_RADIO and ZMQ_DISH . I built libzmq and cppzmq with CMake ExternalProject and and the flag ENABLE_DRAFTS=ON and verified it was built with drafts using the zmq_has() function. I modified the standard hello world example to use radio and dish and cannot get them to talk. I also get compilation errors that ZMQ_RADIO and ZMQ_DISH are undefined. I defined them manually and it compiles but I never get an actual connection so it seems like something else is wrong. Here's my code: CMakeLists.txt cmake_minimum_required(VERSION 2.8.11) project(zmq_udp)

centos7部署rabbitMq

时光怂恿深爱的人放手 提交于 2019-12-06 05:22:51
目录 一、消息中间件相关知识... 1 1、概述... 1 2、消息中间件的组成... 1 3 消息中间件模式分类... 2 4 消息中间件的优势... 3 5 消息中间件应用场景... 4 6 消息中间件常用协议... 6 7 常见消息中间件MQ介绍... 7 7.1 RocketMQ.. 7 7.2 RabbitMQ.. 7 7.3 ActiveMQ.. 8 7.4 Redis. 8 7.5 Kafka. 8 7.6 ZeroMQ.. 9 8、主要消息中间件的比较... 9 二、部署RabbitMq. 10 1、安装一些依赖... 10 2、因为rabbitmq是基于erlang环境的,所以要先安装erlang环境... 10 3、安装rabbitMQ.. 11 一、消息中间件相关知识 1、概述 消息队列已经逐渐成为企业IT系统内部通信的核心手段。它具有低耦合、可靠投递、广播、流量控制、最终一致性等一系列功能,成为异步RPC的主要手段之一。当今市面上有很多主流的消息中间件,如老牌的ActiveMQ、RabbitMQ,炙手可热的Kafka,阿里巴巴自主开发RocketMQ等。 2、消息中间件的组成 2.1 Broker 消息服务器,作为server提供消息核心服务 2.2 Producer 消息生产者,业务的发起方,负责生产消息传输给broker, 2.3 Consumer

What are the suitable options for lightweight RUDP network library for c++ and mono? [closed]

我们两清 提交于 2019-12-06 05:15:35
Closed. This question is off-topic . It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . It's a long time that I'm prototyping the network libraries for our MMO game which it's back-end is in c++ and the client uses Unity3d. I've used ZeroMQ, It's a very strong and awesome library but it doesn't have an official port for c# with .Net 3.5, So I can not use it with unity properly in the client and it also does not have the RUDP support. I've checked ENet, It's basically an RUDP messaging library, but

How can I clean up properly when recv is blocking?

眉间皱痕 提交于 2019-12-06 05:11:59
问题 Consider the example code below (I typed it up quickly as an example, if there are errors it doesn't matter - I'm interested in the theory). bool shutDown = false; //global int main() { CreateThread(NULL, 0, &MessengerLoop, NULL, 0, NULL); //do other programmy stuff... } DWORD WINAPI MessengerLoop( LPVOID lpParam ) { zmq::context_t context(1); zmq::socket_t socket (context, ZMQ_SUB); socket.connect("tcp://localhost:5556"); socket.setsockopt(ZMQ_SUBSCRIBE, "10001 ", 6); while(!shutDown) { zmq

How to send / receive binary data serialized with Protocol Buffers using ZMQ

青春壹個敷衍的年華 提交于 2019-12-06 03:15:00
I need to send an object (serialized with GPB) on a ZMQ socket. Currently the code have an extra copy. How do I directly write serialized array into message_t s data? ABT_CommunicationProtocol introPacket; // Fill the packet message_t introMessage; size_t dataLenght = introPacket.ByteSize(); char* temp = new char[dataLenght]; introPacket.SerializeToArray(temp, dataLenght); // write data to temp memcpy(introMessage.data(), temp, dataLenght); // copy data to message this->serverRquest.send(introMessage); Don't use zmq_send but zmq_sendmsg int cgi_msg_cnx_pool::PbToZmq(::google::protobuf::Message

More threads created than expected

为君一笑 提交于 2019-12-06 03:04:46
You could find the program here I am building a program in message passing framework 0MQ. I try to implement what I posted in here Program compiled with g++ -std=c++11 test.cpp -o test -lzmq -lpthread . To run the program, pass one parameter as the thread number you would like to have. That parameter is then assigned to variable worker_num . In main thread, I setup thread with: vector<thread> pool; for(int i = 0; i < worker_num; i++) { cout << "main() : creating thread, " << i << endl; pool.push_back(thread(task1, (void *)&context, i)); } I would like to make sure all worker threads have

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

拜拜、爱过 提交于 2019-12-06 02:32:17
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 threads that depend on sockets for sending messages? Do we share a pool of sockets, do we create/destroy

There is an example of Spyne client?

落花浮王杯 提交于 2019-12-06 00:17:01
问题 I'm trying to use spyne (http://spyne.io) in my server with ZeroMQ and MsgPack. I've followed the examples to program the server side, but i can't find any example that helps me to know how to program the client side. I've found the class spyne.client.zeromq.ZeroMQClient , but I don't know what it's supposed to be the 'app' parameter of its constructor. Thank you in advance! Edit: The (simplified) server-side code: from spyne.application import Application from spyne.protocol.msgpack import

ZMQ: No subscription message on XPUB socket for multiple subscribers (Last Value Caching pattern)

徘徊边缘 提交于 2019-12-05 23:12:10
问题 I implemented the Last Value Caching (LVC) example of ZMQ (http://zguide.zeromq.org/php:chapter5#Last-Value-Caching), but can't get a 2nd subscriber to register at the backend. The first time a subscriber comes on board, the event[0] == b'\x01' condition is met and the cached value is sent, but the second subscriber (same topic) doesn't even register ( if backend in events: is never true). Everything else works fine. Data gets passed from the publisher to the subscribers (all). What could be