qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amy Wu <...@adaptiveapps.com>
Subject Clearing userId field on JMS message
Date Wed, 18 Jun 2014 22:40:55 GMT

I am using Qpid JMS to send messages to a C++ broker which will then be received by a C++
client.  My JMS client connects to the broker using a different authenticated user than the
C++ client.  The issue I am running into is that when the JMS client sends a message, it sets
the user_id property on the message so that when the C++ client receives the message, it errors
out with something like:

"unauthorized-access: authorised user id : user1@QPID but user id in message declared as user2

Without having to force both my clients to authenticate using the same username, is there
any way to work around this issue?

The easiest solution seems to be to have my JMS client set the user_id property of the message
to be empty string, but I can't seem to find a way to do this.  I see in org.apache.qpid.client.BasicMessageProducer_0_10.sendMessage
there is the following line:

And tracing back, it looks like the userIDBytes is basically grabbed from the producer's connection

But is there any way to prevent the setting of the user id from happening?  I know that when
I send a message from the C++ client, the userId property of the message is empty by default.
 Why is the JMS side different?

Or an alternative is, is there a way to ignore the user_id field when receiving messages?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message