[zeromq-dev] Java examples

Pavol Malosek malosek at fastmq.com
Tue Jun 2 16:59:50 CEST 2009


----- Original Message ----- 
From: "Roshan Punnoose" <rpunnoose at proteus-technologies.com>
Sent: Tuesday, June 02, 2009 4:22 PM


> Thanks for the examples. When I tried running one of the examples, I got
> this exception:
>
> java j_remote_lat localhost 0 1 10 2
> java: ip.cpp:207: void zmq::resolve_nic_name(in_addr*, const char*):
> Assertion `rc != 0' failed.
> Aborted
>
> Any ideas?
>
> I want to run each client remotely, but I guess I don't understand the
> concept of what makes something a local connection verses a remote
> connection according to these tests.

Hello,

In j_remote_lat are created global exchange and global queue (global means that 
remote side can connect to it).
Therefore interfaces where to listen have to be specified, on Linux eth0, eth1, 
lo... can be used since they can be translated into IP addresses.
On Windows or if you are not sure use IP address directly.

To run java tests on loopback interface:

1. zmq_server
2. j_remote_lat 127.0.0.1 127.0.0.1 127.0.0.1 10 2
3. j_local_lat 127.0.0.1 10 2

short linux version
1. zmq_server
2. j_remote_lat localhost lo lo 10 2
3. j_local_lat localhost 10 2

If you want to run tests between two boxes (A 10.0.0.1 eth0 , B 10.0.0.2 eth0)

1. A zmq_server
2. A j_remote_lat 127.0.0.1 10.0.0.1 10.0.0.1 10 2 ( we want to listen for 
incoming connections on 10.0.0.1 interface)
3. B j_local_lat 10.0.0.1 10 2 ( zmq_server runs on host A 10.0.0.1)

short linux version
1. A zmq_server
2. A j_remote_lat localhost eth0 eth0 10 2
3. B j_local_lat 10.0.0.1 10 2

malo 




More information about the zeromq-dev mailing list