When I open a socket in Java to send/receive data, I can do the following:

// open socket
dc = DatagramChannel.open(StandardProtocolFamily.INET6);

// set options ... 

// bind to IP. The SocketAddress comes from the network-interface using 
// NetworkInterface.getByName(networkIntf)
dc.bind(socketAddress);

But that's the theory. I use ActiveMQ to receive JMS messages and write the
following:

ActiveMQConnectionFactory connectionFactory = new
ActiveMQConnectionFactory("system", "manager", "tcp://some_server:61616");

>From the preceding answer from SuoNayi, the following code should work:

ActiveMQConnectionFactory connectionFactory = new
ActiveMQConnectionFactory("system", "manager",
"tcp://broker-ip:broker-port/local-ip:local-port?wireFormat.maxInactivityDuration=120000
");

where the variable "local-ip" comes from the 
NetworkInterface.getByName(networkIntf) object.

However, I can't find any documentation. I will try this code tomorrow.
Further info is really appreciated.

greetings
Jan





--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Best-protocol-network-interface-binding-tp4664240p4664435.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to