I have a program written in Java that should send messages out via ZeroMQ
to be listened and responded to by another program I have running.
The problem is that the listener is on another computer on the local network and I need to somehow perform port forwarding in ZeroMQ
in order for the messages to be received across the network.
ZMQ.Context context = ZMQ.context(1);
ZMQ.Socket requester = context.socket(ZMQ.REQ);
requester.connect("tcp://192.168.78.14:5570"); //192.168.78.14 is the address of listening machine
String msg = "Message";
requester.send(msg.getBytes());
byte[] reply = requester.recv();
When the above code is run, the program waits indefinitely for a response (that never comes) and so effectively is unresponsive. The listener is listening on tcp://127.0.0.1:5570
for messages. Setting it to tcp://0.0.0.0:5570
or tcp://*:5570
which supposedly opens listening to all addresses on given port also yields nothing.
Any help is appreciated.