Get local IP address of the client

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Get local IP address of the client

czaban
Is it possible to get the current local IP of the client used to connect with
broker? We have few active ip addresses in the same machine and the simple
Dns.GetHostAddresses(Dns.GetHostName()) is not the solution.



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Reply | Threaded
Open this post in threaded view
|

Re: Get local IP address of the client

Tim Bain
From memory, I believe the JMX beans expose information about the IP of
each connection, so you can get it that way.

Alternatively, assuming you know the client's port number, you can use
netstat to find the connection with that port number and then get the IP
that way.

Tim

On Dec 4, 2017 3:27 PM, "czaban" <[hidden email]> wrote:

> Is it possible to get the current local IP of the client used to connect
> with
> broker? We have few active ip addresses in the same machine and the simple
> Dns.GetHostAddresses(Dns.GetHostName()) is not the solution.
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-
> f2341805.html
>