Best messaging pattern for server that spawns multiple workers [closed]
I'm writing a system in which a server program will spawn multiple worker processes (using CreateProcessA) to work on tasks in parallel. I want to use ZeroMQ to communicate tasks to the workers and...
View ArticlePass ZMQ context to thread
In C++ I'm using ZeroMQ to build a simple client-server chatting application. Once the context is initialised in the main, I'd like to pass it to a thread and declare there the socket used to output...
View ArticleHow can I secure socket in NetMQ/ZeroMQ?
I'm using Router-Dealer and Pub-Sub patterns to send and receive messages using TCP(tcp://).The Server-Client communication is working fine and now I need to secure this socket connection over a...
View ArticleZeroMQ subscriber in Rails worker fails to receive messages
I am trying to subscribe to ZeroMQ from my Quake Live server. I registered the server on QLStats (green status here). However, my Rails 7.2.2.1 worker using ffi-rzmq 2.0.7 fails to receive messages. I...
View Articleshould a high performance trading engine save to DB synchronously?
For a high performance trading engine, it matches/handles one order at a time, should it save the order and other critical info to DB before it moves on to the next one?or can I use a separate thread...
View ArticleFor how much time ZeroMQ (0MQ) server keeps state information of a client...
I am studying the message delivery guarantee in ZeroMQ, if it ensures exactly-once message delivery.The classic method is to keep the message number and client ID at the receiving node, and each time a...
View ArticleWhy a code, trying to read messages from two ZeroMQ sockets, fails?
I have issues with reading messages from two zmq servers (one set to REQ|REP and one PUB|SUB)The two servers are running on another computer. When I read just the REQ|REP connection everything works...
View ArticleZeroMQ PUB-SUB communication : SUB receives nothing
I'm trying to get a PUB-SUB communication in ZeroMQ working where the PUB is in C++ and the SUB in python. I am using python 3.8, ZeroMQ 4.3.2, pyzmq 18.1.1 and cppzmq 4.5.0The PUB : int main() {...
View ArticleHow to make ZMQ pub client socket buffer messages while sub server socket is...
Given 2 applications whereapplication A is using a publisher client to contentiously stream data to application B which has a sub server socket to accept that data, how can we configure pub client...
View Article0MQ - get message ip
A client is connecting himself to a server. The server should save the IP and do stuff with it later on (I really need the IP).I found this answer but I don't understand how I get the IP out of the...
View Articleusing ZeroMQ with Electron 22 and Electron-Forge
I am trying to use ZeroMQ (0MQ) inside an Electron application: npm add zeromq@6.0.0-beta.19 and electron@22.3.24 and @electron-forge/cli@6.0.5On my local machine, for development, everything works as...
View ArticleBuilding ZeroMQ on Windows 10 with Visual Studio and / or CMake fails
I am trying to set up a Co-simulation between Matlab / Simulink and an external application using the ZeroMQ library. The example I would like to build upon is described here. Therefore I need a...
View ArticleHow to publish std::vector using zmq
I’m working on a ZeroMQ PUB/SUB setup where the publisher sends point cloud data captured from an Intel RealSense depth camera, and the subscriber reconstructs it for further processing.In my...
View ArticleHaving multiple sockets for same Context() and same port in ZMQ
My current system takes input stream from cameras, each camera in a separate instance, and apply Computer Vision models on each camera (Object Detection, Object Tracking and Personnel Recognition), and...
View ArticleMulti-threaded publish with zmq
I have a question as to the best way to publish from many threads to a single subscriber in ZMQ is. I have a web server, written in C++, that for each connection in, will need to send a ZMQ message to...
View ArticleHow to reconnect zeromq client to server?
I have just started using the Python ZeroMQ library, pyzmq==27.1.0.I am running on a Raspberry Pi 5 (debian 12 - bookworm)I want to make sure my client reconnects if my server stops and restarts. When...
View ArticleZmq for random recv and reply
I have two question regarding Zmq:-1) I am implementing a server which would receive 10K requests/per minute and then redirect these request towards backend. After getting response from backend it will...
View ArticleWhat is a good way to implement a barrier with ZeroMQ?
I have a barrier implementation, using a PAIR/PAIR interconnection.The server side will send a JSON-message to client and then wait for client sending a message. I will send 40000 messages in one test,...
View Articlehow to set zmq subscriber to buffer no msg
How to maker the zmq pub/sub subscriber buffers no msgs at all?import zmqimport timePUB_ADDR = "tcp://localhost:12345"ctx = zmq.Context()socket =...
View ArticleAutomatic reconnect in case of network failures
I am testing .NET version of ZeroMQ to understand how to handle network failures. I put the server (pub socket) to one external machine and debugging the client (sub socket). If I stop my local Wi-Fi...
View Article