Questions tagged [zeromq]

0

votes
0

answer
2

Views

How to prevent infinite wait in Python ZeroMQ push/pull process?

I am setting a connection between Python and MT4 using ZeroMQ. Python acts as the client(receiver) . There is a class developed that creates a socket communication for sending and pulling data to/from MT4 using the remote send/remote pull methods. What do I need to add to the code to end the sendi...
fylaxtas
1

votes
1

answer
254

Views

ZeroMQ multiple topics in publisher

List a and b are the keys and the values. The values in variable b are assigned as topicnumbers and data is sent every 10 seconds to a topic. Is this is a stable way to distribute information? Does one see any difficulties for in the near future when the keys and thus topics are scaled up to 100+? i...
Bondeaux
1

votes
1

answer
377

Views

Stream information through a WebSocket received through ZeroMQ in Python

currently, I have a little script that receives a lot of information through various channels using ZeroMQ PUB-SUB sockets. What i want to do is: receive the info with zmq, process it, and then, send it away through a WebSocket, in order to be able to use it in an AngularJS application, displaying r...
1

votes
1

answer
261

Views

ZeroMQ Poll - Resource temporarily unavailable

I am trying to run a small ZeroMQ application. I am working on an Ubuntu machine with also a QT framework used in my code. First of all, I create a test_class. This class creates a socket and a context, than establishes a connection. Here is my test class : Header File : class test_class { public:...
user3104363
1

votes
1

answer
241

Views

Unable to receive multiple clients data using ZeroMQ

I am executing this program of server, receiving from multiple clients, but after the first message for one client, the server is receiving the data and then it does not wait for other client request and just display the first clients data and stops. Also, I am unable to be a client from other VM, w...
user9371612
1

votes
1

answer
534

Views

How to resolve - Fatal error: Uncaught Error: Class 'ZMQContext' not found?

I have successfully installed ZeroMQ in WAMP, see the screenshot below. However I am getting Error: Fatal error: Uncaught Error: Class 'ZMQContext' not found in C:\wamp64\www\0MQ\zguide\examples\PHP\hwclient.php:9 Stack trace: #0 {main} thrown in C:\wamp64\www\0MQ\zguide\examples\PHP\hwclient.php on...
Terungwa
1

votes
1

answer
129

Views

ZMQ messages not being received

Please forgive me if I'm missing something simple, this is my first time doing anything with messaging and I inherited this codebase from someone else. I am trying to send a message from a windows machine with an IP of 10.10.10.200 to an Ubuntu machine with an IP of 10.10.10.15. I got the following...
Matt
1

votes
1

answer
366

Views

Topics in ZeroMQ

How better to separate topics using ZeroMQ - just by specifying different ports or by using prefixes like here: ZeroMQ and multiple subscribe filters in Python It looks simpler to specify ports. I do not mean to connect to multiple topics. I mean that different parts of application will connect to d...
Oleksiy Druzhynin
1

votes
0

answer
59

Views

How to model ZeroMQ async multithreading server

I want to implement a high-throughput server that accepts multiple clients. Every request should query a database, so I need some kind of async behavior. I followed the ROUTER-to-REQ pattern from documentation + Futures, so I ended with this 'architecture': trait ZmqProtocol extends Protocol { priv...
Bade
1

votes
1

answer
169

Views

Dynamic creation of a peer-peer socket (ZeroMQ)

My purpose is to create dynamically some ZeroMQ sockets (peer-peer) in C. I have one listen socket in my server and when a client sends a message I attribute a new port and create a connection with this new port and I return on my listen socket. Ex: server listens to a port 8500 client 1 sends a m...
maxmaiz
1

votes
1

answer
78

Views

ZMQ request sending guarantee

I cannot find anywhere in the guide or RFC if when using REQ / REP sockets, suppose I successfully send a message through the REQ socket, does it guarantee that the REP socket got the message ? If not how do you introduce single client/server reliability using timeouts when recv calls are not block...
VictorDumas
1

votes
1

answer
382

Views

about ZeroMQ and polling on non-blocking sockets

In Linux, if an application uses raw non-blocking sockets for reading, in conjunction with poll, will it be possible to be notified when a socket has some data available for reading or not? I tried to dig into ZeroMQ documentation, but I cannot find my way. I found the flag ZMQ_NOBLOCK, but it is ap...
1

votes
1

answer
132

Views

Python TCP client

I have created a TCP client in python, hoping it would listen for the constant stream of data being thrown at it. But it hangs after just reading 10 bytes. Python: import socket TCP_IP = '10.0.0.25' TCP_PORT = 31031 BUFFER_SIZE = 4096 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(...
garg10may
1

votes
1

answer
116

Views

Python Asynchronous Requests in a While Loop

I currently have a program which uses a while loop to receive messages as a subscriber from a zmq_socket. Every time I get a new message, I need to make an HTTP request to a server, which will then send a response. This call takes around 1 second to make. I would like to have a way to call the HTTP...
aep
1

votes
0

answer
48

Views

“Node 8 The Right way” - why the ouput of zmq-filer-req-loop.js interleaved?

In the book 'Node 8 the right way', in section 'Trading Synchronicity for Scale', I thought that the code in the main zmq-filer-req-loop.js file has to be completed before any callbacks can be called. Which means all the requests have to be sent and the main file is completed, before the first callb...
Phat Nguyen
1

votes
2

answer
56

Views

ZMQ missing events being propagated in jeromq scala

I am new to ZeroMQ and seem to be losing messages in a loop in my begin() method. I'm wondering if I am missing a piece where I am not queuing messages or something? When I cause an event on my publisher, that sends two messages to my subscriber with a small gap in between, I seem not to be getting...
Chris Stewart
1

votes
1

answer
32

Views

How many bytes are used for longer string when sending via ZMQ?

I'm using ZeroMQ / ZMQ from Python and Java and have a question. When sending a shorter string, ZMQ uses one byte as described here (http://zguide.zeromq.org/page:all#A-Minor-Note-on-Strings) Then what goes onto the wire is a length (one byte for shorter strings) and the string contents as individua...
kangaroo
1

votes
0

answer
48

Views

sending message with zmsg_send doesn't arrive after 3 times

When using zmsg_send in a loop the first 2 messages arrives to the server and the 3rd does not. any solutions? void main(void) { // --------------------------------------------------------WAS MEANT SERIOUSLY: int major, minor, patch; zmq_version ( &major, &minor, &patch ); printf (...
Linus-Steve Gates
1

votes
1

answer
723

Views

How to send a message in MQL4/5 from MetaTrader Terminal to python using ZeroMQ?

I just want to send a message from MetaTrader Terminal, using it`s MQL4/5 to Python, just a simple client server, in which MQL4/5 is a client that sends, and python is a server who receives and these two are syncing with ZeroMQ. The Python side code is this which I am sure this part is working fine:...
Kent Winston
1

votes
1

answer
79

Views

Can you get the identity/address of the publisher and subscriber in ZeroMQ?

I have been reading the docs and I can't seem to find if there's any information regarding my query. I just need the IP addresses of the publisher and the subscriber to keep track and so I can display them as an output of my program. Assuming I have a network wherein my publisher and subscribers ar...
Mark Sanchez
1

votes
1

answer
40

Views

How may the Monitor Interval effect the Network Traffic ~.1 [GB/s] in ZeroMQ?

So, I have a process that manages a bunch of workers that uses a REQ/REP and a PUB/SUB pattern for each worker bee. I set the monitor interval to 250 [ms] and all has been working fine. When I deploy onto a Windows server, and startup the resource monitor, the amount of network traffic (bytes writte...
Eric Hallander
1

votes
1

answer
75

Views

ZeroMQ round-robin fail-over on disconnected peers

I'm using ZeroMQ's multiple connect feature, to connect a single DEALER to 2 ROUTERS: +----> .Connect() --> ROUTER 1 / DEALER ---+------> .Connect() --> ROUTER 2 In my test, I send 10 mesages through the DEALER. I get back a nice even distribution of 5 messages to each of the ROUTER-s. My problem is...
Matt Wlazlo
1

votes
1

answer
86

Views

PHP React\ZMQ\Context 'ON' methods not fire

I am trying to implement a web socket server using php. I have followed instructions in ratchet. But I couldn't push changes to client. I understood that problem is 'React\ZMQ\Context' that does not react to any event. As I expected, this component should react to open, close, message and error even...
Ali Parsa
1

votes
1

answer
135

Views

TypeScript: Large memory consumption while using ZeroMQ ROUTER/DEALER

We have recently started working on Typescript language for one of the application where a queue'd communication is expected between a server and client/clients. For achieving the queue'd communication, we are trying to use the ZeroMQ library version 4.6.0 as a npm package: npm install -g zeromq an...
Abhijit Parkhi
1

votes
1

answer
239

Views

How to install ZeroMQ library on Windows 10 for Java?

I want to use ZeroMQ for Windows 10 64bit to use in Java. I am using Intelj as my IDE. I googled and the only thing I found out was to compile library from source ( Mostly for Linux ). Is there any way to use a compiled ZeroMQ library, so I can import it easily in my java code?
Sina Mirshahi
1

votes
2

answer
195

Views

How to set a timeout for 0MQ ( ZeroMQ ) in Java?

I need to add a timeout for the reply/request transaction using 0MQ. How is this typically accomplished? I tried using the method : socket.setReceiveTimeOut(); and socket.setSendTimeout(); but they seem to cause a null pointer exception. In essence, I want the application to timeout after 10 second...
Oscar
1

votes
0

answer
25

Views

Using ZeroMQ with Visual Studio 2008 - LNK2019 errors

I need to use ZeroMQ in a an application built in Visual Studio 2008. I've done the following: -Download ZeroMQ to get the following library: libzmq-v90-mt-4_0_4.lib. -Cloned the libzmq repository from Github. -In Visual Studio project properties: Added the '\include' directory of the libzmq to C/C...
user1453782
1

votes
0

answer
56

Views

Delay measurement during ZeroMQ communication between Blender and LabVIEW

I'm trying to communicate between LabVIEW and python using ZeroMQ socket library(PUB-SUB), both on the same local machine(OS-windows) and trying to measure the delay at the receiving end. Basically, I'm triggering the LabVIEW's(this is being the publisher) while loop every 1000 ms and reading the di...
1

votes
0

answer
213

Views

Getting error java.lang.UnsatisfiedLinkError: no jzmq in java.library.path in IntelliJ ide with windows 10

I have a java project which have zeromq implementation. i have installed zeromq windows version in my windows 10 OS. When running the application i am getting above error. I have downloaded zeromq (windows) installer from http://zeromq.org/area:download and installed it in C:\ZeroMQ4.0.4 folder. Any...
Kamran Shahid
1

votes
0

answer
238

Views

Using ZeroMQ/ZMQ in react js for subscribing data

I want to use ZeroMQ/ZMQ in react-js app to subscribe connection and monitor data response from python app .have you ever anyone to use this app in React and have an example when I use var zmq = require('../');var sock = zmq.socket('sub'); error TypeError: zmq.zmqVersion is not a function and faile...
1

votes
0

answer
184

Views

ZeroMq: Too many open files.. Number of fd usage growing continuosly on the same object

Through the same class object which includes 2 zeromq subscriber and 1 zeromq request socket, I create objects in different threads. I use inproc zeromq sockets and that belong to same ZContext. Each time I create the object the number of open files (lsof | wc -l) in the server (operating Centos 7)...
Olkan
1

votes
1

answer
234

Views

Multiplexing vs Multithreading on a TCP Distributed System

When designing a distributed system with 30 plus applications that each have 4 threads a piece for communication, so 120 threads total of 30 applications. We use ZeroMQ which uses Linux Sockets. Is this number of threads going to be serious strain on the network? Does multiprocessing/multiplexing ha...
Frank
1

votes
1

answer
49

Views

nodejs - Stress test zeromq sockets

I have a zeromq rep socket server set up and want to stress test how many requests per second it can process. What is a good way of going about this? I can just write a script that fires N number of requests and take the total time, but that would include the time spent in the concurrency overhead o...
user3690467
1

votes
0

answer
83

Views

zmq_bind segfault for tcp & ipc

In working with the zmq library in C/C++, the following code produces a segmentation fault on the bind command. Using ZMQ v4.2.5 (currently the latest stable release). Below is the relevant code for the connection: creating the context, the socket, and binding the socket (which is the trouble line...
fhornplayer
1

votes
1

answer
57

Views

ZMQ SUB socket suddenly stop receiving any msg

I am using ZMQ PUB/SUB mode to distribute market data to multi clients. The server bind and pub, and multi clients connect and sub. Everything works fine at the beginning, all clients are able to get data happlily. But sometimes, after hours of normal working, only some of the client suddenly stops...
FaceBro
1

votes
0

answer
138

Views

ZeroMQ (via pyzmq) vs. Python Standard Library: Why one over the other?

Soon I'm going to be writing some Python code to make two services (A and B) talk to each other. They might be on the same machine, or they might not (but I will know in advance of deployment). I have two options; either the standard library, or ØMQ (via pyzmq). Why would I use one over the othe...
JesseTG
1

votes
1

answer
33

Views

Threading Condition Acquire lock is not actually acquiring the lock

I am trying to create a ZMQ Subscriber that writes to a CSV every certain amount of time (The time doesn't matter as much) My problem im having is in my write class. When I'm run the c.acquire to acquire the lock it doesnt do anything and the loop just freezes The c.acquire in my ZMQ_Thread class is...
Lovinthecane
1

votes
1

answer
49

Views

zeromq raise exception in I/O thread

when we send bad data into zmq socket, I/O thread raises exception and process gets killed. Call stack of crash is as below 00 KERNELBASE!RaiseException+0x68 01 zmq::zmq_abort(char * errmsg_ = )+0x21 [objdir-windows-msvc-14.0.x86_64\build\libzmq\src\err.cpp @ 89] 02 zmq::tcp_read(unsigned int64 s_...
vibk
1

votes
1

answer
90

Views

How to setup PUB/SUB NetMQ in Xamarin Forms

I have a Windows Services running as a Publisher and I am trying to setup Xamarin Forms as the Subscriber. The code below works just fine in a Console App or LinqPad, but when copied and pasted into Xamarin Forms, the SubscriberSocket just does not respond to messages from the server. Do you know h...
Fabio S.
1

votes
0

answer
39

Views

Spawning a Process within a thread raises ZMQError: Interrupted system call

I have a multithreaded, multiprocess code. The action takes place inside a thread called in a loop every 5 seconds (reactor LoopingCall). the main action function spawns a multiprocessing.Process that has no interaction with zeromq library. Somehow spawning this process leads to a ZMQError: Interru...
apramc

View additional questions