[rabbitmq-discuss] How to obtain local address used in a connection

Simon MacMullen simon at rabbitmq.com
Fri Mar 25 14:40:01 GMT 2011


Or, look at the management plugin to get a server-wide view.

Cheers, Simon

On 25/03/11 14:37, Simon MacMullen wrote:
> Something like (untested, top of my head):
>
> Connection c = ...;
> ((SocketFrameHandler) ((AMQConnection)
> c).getFrameHandler())._socket.getLocalAddress();
>
> Not sure if that counts as "ready"...
>
> Cheers, Simon
>
> On 25/03/11 14:30, Fabio Margarido wrote:
>> Sorry, I forgot: I'm using the Java client.
>>
>> On Fri, Mar 25, 2011 at 11:29, Fabio Margarido <fabiomargarido at gmail.com
>> <mailto:fabiomargarido at gmail.com>> wrote:
>>
>> Hi there,
>>
>> is there a ready way to obtain (from the Connection object or some
>> other means) which of the local machine's IP addresses was used to
>> connect to the broker?
>> Thanks in advance.
>>
>>
>>
>>
>> _______________________________________________
>> rabbitmq-discuss mailing list
>> rabbitmq-discuss at lists.rabbitmq.com
>> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>


-- 
Simon MacMullen
Staff Engineer, RabbitMQ
SpringSource, a division of VMware



More information about the rabbitmq-discuss mailing list