Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPC between Python and Java #503

Open
qeroll opened this issue Feb 28, 2024 · 0 comments
Open

IPC between Python and Java #503

qeroll opened this issue Feb 28, 2024 · 0 comments

Comments

@qeroll
Copy link

qeroll commented Feb 28, 2024

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")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant