zeromq / jzmq

Java binding for ZeroMQ
http://www.zeromq.org
GNU General Public License v3.0
590 stars 364 forks source link

IPC between Python and Java #503

Open qeroll opened 8 months ago

qeroll commented 8 months ago

Hi,

I am trying to communicate over IPC using a JZMQ subscriber and PyZMQ publisher but messages are received in the JZMQ side. I have checked my publisher using a Python subscriber and did it work.

Any ideas? Is that perhaps not supported?

The JZMQ code:

ZContext context = new ZContext();
Socket subscriber = context.createSocket(SocketType.SUB);
subscriber.connect("ipc://001);
subscriber.subscribe("".getBytes());
byte[] data = subscriber.recv();

The PyZMQ code:

import zmq

ZMQ_SERVER_ADDRESS = "ipc://001"

context = zmq.Context()
socket = context.socket(zmq.PUB)
socket.bind(ZMQ_SERVER_ADDRESS)
socket.send(b"1234")