Socket receive = context.socket(ZMQ.PULL);
receive.bind("tcp://localhost:5001");
while (!Thread.currentThread().isInterrupted()) {
String message = receive.recvStr(0);
System.out.println("Received: " + message);
pub.send(message, 0);
}
receive.close();