Questions tagged [jeromq]

JeroMQ is a pure Java implementation of libzmq

JeroMQ is a pure Java implementation of libzmq (http://zeromq.org)

Features:

  • based on zeromq-3

  • tcp:// protocol and inproc:// is compatible with zeromq

  • not too bad performance compared to zeromq 2M messages (100B) per sec Performance

  • exactly same develop experience with zeromq

89 questions
2
votes
3 answers

Inter-process communication using ZeroMQ: Transferring large arrays

I need to establish communication between a Scala process (JeroMQ) and a C process (ZeroMQ). The Scala process needs to send large arrays (100 million floats per array). This is first converted to a JSON string, and as you can see below, I am…
user1274878
  • 1,275
  • 4
  • 25
  • 56
2
votes
1 answer

Assertion error polling from inside a new thread in ZeroMQ (JeroMQ)

I have code that looks like this: public void handleRequests() { ZMQ.Poller items = new ZMQ.Poller(1); items.register(clientEndpoint, ZMQ.Poller.POLLIN); while (!Thread.currentThread().isInterrupted()) { byte[] message; …
L. Blanc
  • 2,150
  • 2
  • 21
  • 31
2
votes
1 answer

Jeromq maximum socket opened issue

I have a server in java which receive a json file and send it to a C program by jeromq. Until last week I just tested it with a few json. I haven't sent a lot of json until now I have another component to send them. Glassfish hanged with an error I…
Biribu
  • 3,615
  • 13
  • 43
  • 79
2
votes
2 answers

JeroMq dropping messages – how to prevent?

I have following “hello world” jeromq PUSH-PULL client and server. Only after I set High Water Mark values am I able to transmit without dropping messages. import org.jeromq.ZMQ; public class TestTcpServer { public static void…
Dan
  • 11,077
  • 20
  • 84
  • 119
1
vote
1 answer

How to receive a multipart message in ZMQ using Java?

As simple as this operation seems I can't find any documentation regarding how to receive a multipart message using ZMQ (Jeromq). I checked The Guide but it only contains C code with this info and it seems that I'm supposed to receive messages the…
Adam Arold
  • 29,285
  • 22
  • 112
  • 207
1
vote
0 answers

Minimizing ZeroMQ round trip latency

My question is about minimizing the latency between a ZMQ client and server I have the following modified Hello World ZMQ (JeroMQ 0.5.1) import org.zeromq.SocketType; import org.zeromq.ZContext; import org.zeromq.ZMQ; public class server { …
Hossein
  • 1,152
  • 1
  • 16
  • 32
1
vote
0 answers

How Do I Get JeroMQ To Work With Android Studio?

My process: Install IntelliJ Create new project Add JeroMQ with File>Project Structure>Global Libraries>org.zeromq:jeromq:0.5.1 Create the following java files in src: publisher.java import org.zeromq.ZMQ; import org.zeromq.ZContext; import…
1
vote
1 answer

JeroMQ subscriber MATLAB

I have latest JeroMQ imported in Matlab and Im trying to connect to a C# program running ZeroMQ publisher. I dont receive any messages and Im sure the publisher is sending. As it seems the socket is connected, I cant probably set socket options…
reicja
  • 88
  • 5
1
vote
0 answers

ScheduledThreadPoolExecutor initialize resource on thread start and inject it to worker-runnable

I have a resource (in my case zmq socket, but this detail can be ignored). The resource is not thread safe, and can be used only from a thread, that opened connection. I want to use it in ScheduledThreadPoolExecutor. So my ideal workflow would…
Igor Piddubnyi
  • 134
  • 4
  • 19
1
vote
0 answers

Java runnable dying on zeromq publisher disconnect

I have a java process that implements Runnable and is used to subscribe/pull to/from a zeromq publisher/pusher, collect the data for a while and once a certain amount or records is reached inserts them into a database. Everything works fine but when…
1
vote
1 answer

Close sockets of JeroMQ-Worker in MultiThreaded Execution

consider the following worker: public class Worker implements Callable .... // initialize context @Override public String call() { ZMQ.Socket pullSocket = context.socket(ZMQ.PULL); pullSocket.connect(HOST_PULL_SOCKET); while…
Hnig
  • 65
  • 8
1
vote
1 answer

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…
kangaroo
  • 407
  • 4
  • 19
1
vote
2 answers

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…
Chris Stewart
  • 1,641
  • 2
  • 28
  • 60
1
vote
1 answer

How to interrupt a call to .read() method on a JeroMQ socket?

In my code I've a thread waiting for events on a ZeroMQ endpoint, and its main loop looks similar to this: while (externalCondition) { byte[] bytes = subscriber.recv(0); // Do things } The problem is that I don't know how to interrupt the call…
Alessandro Polverini
  • 2,301
  • 19
  • 29
1
vote
3 answers

Application closes when socket.bind() is called - JeroMQ on Android

I'm new to programming with Message Queues in general and I've been trying to work on a simple Android Application that uses ZeroMQ. I'm running both server and client program on the same device in separate Threads. This is my Server class: public…
J. Maruca
  • 48
  • 6