1 Reply Latest reply on Feb 6, 2015 11:34 AM by Justin Bertram

    How to know the socket being used on JMS?

    james viet Newbie

      I used client and the client will create a connection to server via HornetQ and Netty

       

      Each of 1 minute, server will send heart beat and client (who subscribered) will be received this message. In the message, I included the root IP of server

       

      Everything will be OK if this server had only 1 network card (NIC).

       

      But in the case, server have 2 or more network cards. I met issue.

       

      In the message is received by client, the IP of server not right.

       

      I used InetAddress.getLocalHost().getHostAddress() to get to root IP and I known it wrong in this case server had 2 NICs

       

      So can you give me some advise, how I can get right IP here?

       

      Some guys said we can refer "the socket being used for getting right IP". Do you know how we can get it?

       

      Thanks in advanced,