pyzmq

2 minutes for ZMQ pub/sub to connect in kubernetes

試著忘記壹切 提交于 2021-02-20 04:49:49
问题 I have a Kubernetes 1.18 cluster using weave as my CNI. I have a ZMQ based pub/sub app and I am often (not always) seeing it take 2 minutes before the subscriber can receive messages from the publisher. This seems to be some sort of socket timeout uniqe to my Kubernetes environment. Here is my trivial ZMQ app example #!/bin/env python2 import zmq, sys, time, argparse, logging, datetime, threading from zmq.utils.monitor import recv_monitor_message FORMAT = '%(asctime)-15s %(message)s' logging

Why is ZeroMQ poller not receiving messages (python)?

孤人 提交于 2021-02-08 08:24:47
问题 I'm trying to use the ZeroMQ Poller() functionality with two sockets in python: import zmq # Prepare our context and sockets context = zmq.Context() receiver = context.socket(zmq.DEALER) receiver.connect("ipc:///tmp/interface-transducer") subscriber = context.socket(zmq.SUB) subscriber.bind("ipc:///tmp/fast-service") subscriber.setsockopt(zmq.SUBSCRIBE, b"10001") # Initialize poll set poller = zmq.Poller() poller.register(receiver, zmq.POLLIN) poller.register(subscriber, zmq.POLLIN) # Process

How pub/sub with pyZMQ between two VMs

别说谁变了你拦得住时间么 提交于 2021-01-28 05:16:06
问题 I have two VMs (VirtualBOx, Ubuntu 18.04 and python-zmq) running within the same physical machine (Win10). Both machines are configured as Bridge and they can be ping successfully 192.168.1.56-192.168.1.65. I've followed this tutorial https://learning-0mq-with-pyzmq.readthedocs.io/en/latest/pyzmq/patterns/pubsub.html, however, it doesn't work. On one machine "server", the data is printed, however, at the subscriber "client", it doesn't receive anything. Have you tried this or do you know

How configure a Multiple PUB/ single SUB python ZMQ Ubuntu

不羁的心 提交于 2020-12-15 06:27:07
问题 I have two VMs (VirtualBOx, Ubuntu 18.04 and python-zmq[16.0.2-2build2]) running within the same physical machine (Win10). Both machines are configured as Bridge and they can be ping successfully 192.168.1.66-192.168.1.55. I've followed this tutorial https://learning-0mq-with-pyzmq.readthedocs.io/en/latest/pyzmq/patterns/pubsub.html. It works if PUB (server) is configured as import zmq import random import sys import time port = "5557" if len(sys.argv) > 1: port = sys.argv[1] int(port)

How configure a Multiple PUB/ single SUB python ZMQ Ubuntu

喜夏-厌秋 提交于 2020-12-15 06:26:07
问题 I have two VMs (VirtualBOx, Ubuntu 18.04 and python-zmq[16.0.2-2build2]) running within the same physical machine (Win10). Both machines are configured as Bridge and they can be ping successfully 192.168.1.66-192.168.1.55. I've followed this tutorial https://learning-0mq-with-pyzmq.readthedocs.io/en/latest/pyzmq/patterns/pubsub.html. It works if PUB (server) is configured as import zmq import random import sys import time port = "5557" if len(sys.argv) > 1: port = sys.argv[1] int(port)

How to install pyzmq on a Alpine Linux container?

早过忘川 提交于 2020-06-09 18:30:32
问题 I have a container with python:3.6-alpine kernel, I have a problem to install the pyzmq with pip on this: Dockerfile: FROM python:3.6-alpine RUN mkdir /code RUN apk add vim WORKDIR / ADD . /code docker-compose.yml: version: '3' services: battery_monitoring: build: . image: bm:1.0.0 container_name: battery_monitoring restart: unless-stopped volumes: - .:/code tty: true When I install several Python libraries on this container I haven't any problem, but in pyzmq library, there is an error: