activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <>
Subject Re: JMSXUserID propagation not working
Date Fri, 18 May 2012 15:35:28 GMT
On Fri, 2012-05-18 at 08:26 -0700, gauche wrote: 
> Hi,
> I am trying to get JMSXUserID to pass from producer (client) to consumer
> (server) but am having no luck.
> My client is a .NET app using NMS V1.5.0.2194, with STOMP V1.5.2.2508. My
> server is a Java app using (indirectly via an internal framework)
> activemq-core-5.3.0.
> My understanding was that all I needed to do was:
> 1. From the client, connect to the broker using a given user name and
> password:
>     this.connection = this.factory.CreateConnection(userName, password);
>     this.session =
> (Session)this.connection.CreateSession(AcknowledgementMode.AutoAcknowledge);
> 2. Set populateJMSXUserID="true" in the broker configuration:
>     <broker useJmx="true" persistent="false"
> xmlns=""
> destroyApplicationContextOnStop="true" populateJMSXUserID="true"
> useAuthenticatedPrincipalForJMSXUserID="true">
> 3. From the server, obtain the JMSXUserID from the message headers:
>     userId = (String) headers.get("JMSXUserID");
> With that in place, I was expecting to see the JMSXUserID come through
> server-side, but it didn't. Even though I couldn't find any documentation
> stating it was necessary, I then tried enabling security on the broker. I
> confirmed that my client and server could only connect with the credentials
> I set up, but still the JMSXUserID was not passed through.
> I noticed a number of bug reports around JMSXUserID propagation and decided
> to upgrade my AMQ 5.5.0 to 5.6.0. But still no joy.
> Am I missing something obvious here? Can anyone give me some guidance on how
> to get JMSXUserID to correctly propagate from my client to server? I'd
> prefer to have broker security disabled if possible.

I don't think 5.3.0 had that option so pretty sure it doesn't work
there.  I know that there is a unit test for this in 5.6.0 and its
working so its possible the Stomp client isn't setting something
correctly. Best thing to do here is create a new Jira issue for
NMS.Stomp with an NUnit test showing your issue along with a broker

Tim Bish
Sr Software Engineer | FuseSource Corp |
skype: tabish121 | twitter: @tabish121

View raw message