628 questions
1
vote
1
answer
51
views
How 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. ...
0
votes
1
answer
59
views
how to set zmq subscriber to buffer no msg
How to maker the zmq pub/sub subscriber buffers no msgs at all?
import zmq
import time
PUB_ADDR = "tcp://localhost:12345"
ctx = zmq.Context()
socket = ctx.socket(zmq.PUB)
socket.set_hwm(1)
...
1
vote
1
answer
74
views
ZMQ Dynamic Discovery with XPub-XSub
I'm attempting to implement dynamic discovery of networked "nodes" using ZMQ's XPub-XSub pattern. Every example I can find online is limited to a single machine - using localhost for the IP ...
1
vote
1
answer
112
views
Using ZMQ, which pattern and framework to use in such a scenario ? Two computers, bidirectional, not knowing which starts first
My application is separated in two computers (A which contains some GUI and B which contains some complex processing).
Here are some constraints:
PROBLEMS
Both computers need to communicate between ...
1
vote
1
answer
80
views
Can't send a NumPy array larger than 2 GB with ZeroMQ
I'm using the Python code shown below to serialize and send a NumPy array from the client to the server using ZeroMQ. I noticed that when the NumPy array is larger than 2 GB the client seems to stall ...
0
votes
0
answers
47
views
PyZMQ asyncio SUB socket not receiving last message even with CONFLATE set to 1
I have an async PUB socket as follows:
import asyncio
import zmq
import zmq.asyncio
async def serve(address: str):
context = zmq.asyncio.Context()
socket = context.socket(zmq.PUB)
socket....
0
votes
1
answer
73
views
How do I trigger a ZeroMQ zmq.EVENT_HANDSHAKE_FAILED_PROTOCOL error?
I am testing an event monitor I wrote in Python for ZeroMQ. I would like to test my callback for the zmq.EVENT_HANDSHAKE_FAILED_PROTOCOL event. What is the easiest way to trigger this event? The ...
1
vote
1
answer
137
views
ZeroMQ Binary Star pattern ( for high availability )
Reading the ZeroMQ Guide I stumbled upon some part of the text that I don't understand very well. This is in Chapter 4, Reliable Request-Reply Patterns, specifically Binary Star pattern.
A suitably ...
1
vote
1
answer
520
views
How to perform a ZMQ communication in python between a Docker Container and localhost using WSL and MacOS
I want to implement a zmq communication between a docker container and the localhost of my windows / mac computer. I want both the docker container and the localhost to be able to send and receive ...
0
votes
1
answer
92
views
ZMQ Pub/Sub no support reset of publisher service node
Hi i are using ZMQ with pub/sub pattern.
I have a one node publisher and other nother subcriber, i tried with python (pyzmq) and with c++ (cppzmq)
If i start publishear service and subscriber servicio ...
0
votes
1
answer
46
views
pyzmq package stopped installing in imx6ul based single board computer
Issue description
pip3 install pyzmq==22.0.3 or pip3 install pyzmq does not install this package anymore on imx6ul based single board computer
Environment
Hardware: NXP imx6ul (https://www.phytec.com/...
1
vote
1
answer
1k
views
Problem With Jupyter and Visual Studio Code
I just keep receiving this error: Failed to start the Kernel:
Bad file descriptor (C:\Users\runneradmin\AppData\Local\Temp\tmpw8fxpxar\build\_deps\bundled_libzmq-src\src\epoll.cpp:73).
View Jupyter ...
0
votes
0
answers
336
views
Can't connect to Kernel on fresh install of Spyder through Miniconda due to port use conflicts
Every time I open spyder, the console runs into the same error, returning an error message that ends with 'ZMQError: Address in use (addr='tcp://127.0.0.1:57242')', rendering spyder unusable.
This ...
-2
votes
1
answer
1k
views
How can I debug this error occuring when trying to install pyzmq?
I try to install this specific package in Python: pip install pyzmq==25.0.2
This gives a following error:
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
...
0
votes
0
answers
271
views
Failed building wheel for pyzmq durring the installation of colab (with github)
I encountered an error during the installation of Google Colab using GitHub.
The error message states:
Building editable for google.colab (pyproject.toml) ... done
Created wheel for google.colab: ...
2
votes
2
answers
89
views
How do I make a dynamic list or array of ZeroMQ (pyzmq) sockets/contexts in Python?
I have a project where the best way to communicate with a series of remote devices is to connect to them with ZeroMQ in PAIR arrangement. (I'll spare the boring technical details as they are ...
1
vote
1
answer
359
views
How do you cleanly terminate a zmq steerable proxy in python?
Context
I am implementing a many-to-many in process Pub/Sub interface with python zmq that can be built up and torn down as needed in a running application. I am using a proxy to connect the XSUB and ...
1
vote
2
answers
175
views
How to pause PUSH messages until the socket has a client with ZeroMQ?
I am using ZeroMQ and NetMQ to allow for a two-way communication between some python scripts and a Unity C# script. I implemented it with two PUSH-PULL sockets, one for each way. This works fine. The ...
0
votes
1
answer
744
views
ZMQ general visibility / debuggiing suggestions
I have beeen using ZMQ (via pyzmq) recently for setting up publish/subscribe between nodes on a single machine. However, when things go wrong, I have no visibility into what is causing the issue, and ...
0
votes
1
answer
56
views
PUB/SUB not sending data
I'm sending data in python between two connect machines within the same network (successfully connected).
The publisher code is defined as:
def senderzmq(self, lat, lon):
sock = zmq.Context()....
1
vote
0
answers
280
views
Cross compiling pyzmq fails because the setup picks up the x86 compiler automatically
I'm trying to cross compile the pyzmq library for my stm32mpu board and I'm facing the issue below.
/usr/lib/python3.10/distutils/dist.py:274: UserWarning: Unknown distribution option: 'cffi_modules'
...
1
vote
0
answers
395
views
GNU Radio ZeroMQ SUB block not receiving messages if delay between messages is more than ~50ms
Background:
Hello there, I am attempting to issue commands to and recieve data from a remote system via UHF antenna. In order to do this, I planned to have a python program running on one computer ...
1
vote
2
answers
147
views
How to wait for subscription forwarding on publisher side when connecting to XPUB-XSUB proxy?
I'm trying to create message bus with ZeroMQ using XPUB-XSUB proxy.
Number of subscribers and publishers will vary as they come and go. Goal is that there could be number of daemons that can ...
0
votes
0
answers
182
views
has anyone tried putting a cell in jupyter 7 that can handle streaming data?
Please note I am asking if this CAN be done NOT how to do it.
I am about to try jupyter 7 and I think it should be able to handle streaming data which updates a cell. So I would set up a stream of ...
1
vote
0
answers
30
views
Navigate between Threads in PyCharm
I recently move to PyCharm Professional in my company.
Before that I was on PyCharm Community.
We have two programs which communicate between them with PyZMQ. Each of them are open in two separate ...
2
votes
1
answer
445
views
Cannot get MQL4 to connect with python via ZMQ
I'm trying to build an algorithmic trading bot. First step is to establish a connection between Python and MQL4 EA. I have the dir set up correctly. As shown below and my scripts are as follows. My ...
2
votes
2
answers
2k
views
Are the ways to speed up ZMQ's recv_multipart()?
I have multiple clients that send dicts of Numpy arrays to a ZMQ server. I managed to pack the dicts of Numpy arrays into a multi part message to avoid memcpy's during deserialization, which doubled ...
0
votes
1
answer
549
views
zmq socket bind fails with: "No such device (addr='tcp://wpan0:5556')" when Thread-network interface should be used
I am creating a system based on a Thread-network in Python. I want to use pyzmq as my messaging foundation (especially the PUB/SUB).
I am using a Raspberry Pi 4 with Debian GNU/Linux 11 (bullseye), ...
1
vote
0
answers
77
views
How to create a multi-threaded ROUTER server in ZMQ?
I have a number of DEALER clients and a ROUTER server that communicate asynchronously.
Currently, the server runs a loop that checks for incoming requests, dispatches them to a thread pool of workers, ...
1
vote
1
answer
227
views
using ZMQ with ser2net
Hi I'm trying to use the hello world example of ZMQ over a serial radio using ser2net. However, when binding to the port it complains "port is already in use", the only other application ...
0
votes
1
answer
202
views
pyzmq client hangs forever on receiving data
Here's simple client-server example on pub-sub pattern with zeromq, created by chatGPT v4. It's pretty self-explanatory and serve for pattern demonstraion purpose. The problem is that client hangs ...
0
votes
1
answer
337
views
Visualizing ZeroMQ network as graph in real time
I have a network of nodes in Python where I am using the ZeroMQ library with publish/subscribe messaging pattern to publish messages in a many-to-many fashion among other nodes. I want to be able to ...
1
vote
1
answer
585
views
PUB/SUB: sub on listen socket / pub on connecting not working properly
I want to use ZeroMQ in a Python project for IPC. One process should receive control commands from other processes. Therefore I decided to follow the PUB/SUB example, but with switched roles.
One ...
1
vote
1
answer
161
views
ZMQ PUB/SUB asyncio doesn't receive any messages
I'm doing work on a pub/sub zmq receiver, one pub, multiple subs which can receive messages from one publisher in an asyncio environment.
The receiver which is asyncio based doesn't receive any ...
2
votes
0
answers
857
views
ZMQ Random Delay/Latency
I am trying to achieve consistent <500 us latency on my ZMQ REQ/REP application. However, I've encountered 2 types of delay.
First packet delay : It varies between 5-6ms levels.
Random delays : It ...
1
vote
0
answers
206
views
legacy-install-failure when trying to install pyzmq package through homebrew and pip
I'm trying to install the PROS CLI on macOS (https://pros.cs.purdue.edu/v5/getting-started/macos.html) through Homebrew, but I keep experiencing errors that I'm unable to fix or find solutions to ...
0
votes
1
answer
136
views
pyzmq: high water mark does not seem to block for push
Thanks for reviewing, There are several thread on this topic but non was able to lead me to solution, I dont think it's duplicate, as this was not answered on many of the other threads on the subject
...
1
vote
2
answers
3k
views
Does ZMQ have a mechanism to tell whether a connection is still alive?
I have a ZMQ server that performs a heavy computation and thus sending the result back to the client via server_socket.send() can take several minutes. The client should wait indefinitely for the ...
1
vote
2
answers
537
views
zmq: subscriber how to get all the messages from publisher while the publisher closes after sending all messages?
While the publisher closes after sending all messages, how to get all the messages from publisher on the subscriber side? For example, if I publish 1000 pieces of data, the subscriber gets 500 data ...
1
vote
0
answers
124
views
PyZMQ asyncio communication between windows server and linux client
I've setup a 1:1 connection between a linux client and a windows server using PyZMQ.
On the client side I use zmq.REQ sockets and on the server side zmq.REP sockets.
The server starts up a messageloop ...
0
votes
1
answer
65
views
wheel, pyzmq, bad file descriptor proplems in anaconda for deep learning
I'm beginner of tensorflow.
I want to install, use jupyter notebook.
But that doesn't work in my notebook with bad file descripotr ploblem.
So I checked,deleted anaconda and tried to downgrade my ...
0
votes
1
answer
486
views
Purpose of zeromq send high watermark
The first time I skimmed the zeromq docs, I assumed that the sender high watermark was there to ensure that the sender did not get too far ahead of the receiver. Now that I'm looking at it more ...
-1
votes
1
answer
84
views
Is it possible to automate the process of running different python scripts in separate Spyder consoles?
I've found running different code across separate console windows in Spyder to be a handy way of executing code concurrently. I've always done this "manually" (hitting the new console button ...
0
votes
0
answers
999
views
How to establish zmq connections between docker containers using docker compose option network_mode: host?
I want to establish a connection using the draft server/client pattern of ZeroMQ across different docker containers. For that, I have a zmq.server that is running in docker_container_server. In ...
1
vote
1
answer
1k
views
Checking if ZMQ subscriber socket is still alive
I have two applications that need to communicate over a ZMQ pub/sub socket using python. The publisher only runs for a couple hours and then shuts down. The subscriber should always be ready and ...
1
vote
0
answers
54
views
? zmq.libzmq imported from - Building 'dist\main.exe'. error: [WinError 87] the parameter is incorrect. PY2EXE
I want to convert my python file main.py into an executable. I'm using Py2exe to do this.
This is my code.
Setup for the conversion
` from distutils.core import setup
import py2exe
setup(
options ...
0
votes
2
answers
271
views
What is the deference bewteen zeromq binding with * and 127.0.0.1
As title, here is 2 ways to binding a zeromq socket.
socket.bind("tcp://*:port")
socket.bind("tcp://127.0.0.1:port")
Both these two way work for me, but I am still curious about ...
-1
votes
1
answer
366
views
ZeroMQ: One to many, one-way communication without topics?
What is the simplest way to use ZeroMQ so that one sender sends out messages and an arbitrary number of receivers can get all those messages?
I would like to send messages which are Python objects (...
2
votes
1
answer
3k
views
How to listen to a TCP stream on my FastAPI server
I am working on a project building an API that is able to send the live location of vehicles to a frontend.
I get this location data by subscribing to a ZMQ stream by running a while loop. This is all ...
0
votes
1
answer
311
views
How can a ZMQ server process requests in batches?
I would like to use ZMQ in a client/server model but where each server waits until it has received 100 requests, processes them jointly, and then sends out the 100 responses back to the correct ...