Mmmm... good question.. it can be accessed through the BrokerService object, but it was never intended to be made accessible... would have to use some hacking to get at it. See attached unit test that has such hacking.

Otherwise, to get at it in JMX, make sure your broker is populating the username:

        BrokerService service = new BrokerService();

Good luck!

On Thu, Nov 29, 2012 at 12:29 PM, prgtrdr <> wrote:
Thanks, Christian.

To put it more succinctly, what I want to do is retrieve the userName for a
given ConnectionId returned by the Advisory onMessage function.

Do you think JMX is the easiest way to do this?  Can't I use the
BrokerService or some other object I have created in the embedded ActiveMQ

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

Christian Posta
twitter: @christianposta