Openwire C++ APIs minus "JMSXUserID"

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

Openwire C++ APIs minus "JMSXUserID"

Naveen Rawat
 

Hi James, I regret this delayed feedback.

 

>>On 8/1/06, Naveen Rawat <naveen@...> wrote:  
>>
>>
>> Hi all.  
>>
>>
>> I am using the binary version of ActiveMQ 4.0 broker and openwire cpp >>APIs to interface my cpp server with the broker.
>>   [  Openwire APIs being taken from -
>>   svn co
>> https://svn.apache.org/repos/asf/incubator/activemq/tags/activemq-4.0/openwire-cpp]  
>>
>>  
>>
>> Please help in solving my queries :-  
>>
>> 1. Does the broker itself has the mechanism to support multiple senders >>to a receiver listening on the same queue?
>
>
>Yes  
>
>
>> 2. Does openwire cpp APIs provides for maintaining Broker's >>Authentication Policy? If not what could be the alternative.  
>>
>
>
>You can send the userName and passsword to the broker when making a
>connection. The security is then performed by the broker.  
>
>
>> 3. How can a sender be authenticated among a senders?
>
>The broker can authorize individual consumers or sends to determine if
>a user has the right to use a specific destination...  
>
>http://incubator.apache.org/activemq/security.html 
>
>
>>     My sender maintains a username and password for connecting to the >>broker and I have set the populateJMSXUserID option to "true" in >>activemq.xml. The
>> broker tag reads like -
>>          <broker useJmx="true" populateJMSXUserID="true">  
>>
>>     My sender connection creating code is as -
>>         connection = factory->createConnection("naveen", "rawat") ;  
>>
>>     Am I missing anything here?
>
>No - you should receive the JMSXUserID header on messages received.
 

Does this UserID fetched from the received message's header has to be set to
the reply message header - so as to make reply in synch with the particular
sender client?


Also, I am not getting any function as such in my set of OpenWire APIs to
retreive the JMSXUserID from the message header. There are functions for
manipulating other header options but not for JMSXUserID. My openwire APIs
are from above mentioned svn location. Am I missing on it or it is actually
not there?

Any other way please suggest.


> 4. For the above created sender is it required for the consumer to
> authenticate sender or is it solely the ActiveMQ job?  
>
>The broker does the authentication and authorization. The JMSXUserID
>is purely so a consumer can see the userName of the sender (and since
>the broker specifies this it can't be spoofed).
>--  
>
>James
 

Thanks and Regards,

Naveen Rawat
Reply | Threaded
Open this post in threaded view
|

Re: Openwire C++ APIs minus "JMSXUserID"

James Strachan-2
BTW the codehaus mailing lists should not be used any more...

On 8/7/06, Naveen Rawat <[hidden email]> wrote:

>
>
> Hi James, I regret this delayed feedback.
>
>
>
> >>On 8/1/06, Naveen Rawat <naveen@...> wrote:
> >>
> >>
> >> Hi all.
> >>
> >>
> >> I am using the binary version of ActiveMQ 4.0 broker and openwire cpp >>APIs to interface my cpp server with the broker.
> >>   [  Openwire APIs being taken from -
> >>   svn co
> >> https://svn.apache.org/repos/asf/incubator/activemq/tags/activemq-4.0/openwire-cpp]
> >>
> >>
> >>
> >> Please help in solving my queries :-
> >>
> >> 1. Does the broker itself has the mechanism to support multiple senders >>to a receiver listening on the same queue?
> >
> >
> >Yes
> >
> >
> >> 2. Does openwire cpp APIs provides for maintaining Broker's >>Authentication Policy? If not what could be the alternative.
> >>
> >
> >
> >You can send the userName and passsword to the broker when making a
> >connection. The security is then performed by the broker.
> >
> >
> >> 3. How can a sender be authenticated among a senders?
> >
> >The broker can authorize individual consumers or sends to determine if
> >a user has the right to use a specific destination...
> >
> >http://incubator.apache.org/activemq/security.html
> >
> >
> >>     My sender maintains a username and password for connecting to the >>broker and I have set the populateJMSXUserID option to "true" in >>activemq.xml. The
> >> broker tag reads like -
> >>          <broker useJmx="true" populateJMSXUserID="true">
> >>
> >>     My sender connection creating code is as -
> >>         connection = factory->createConnection("naveen", "rawat") ;
> >>
> >>     Am I missing anything here?
> >
> >No - you should receive the JMSXUserID header on messages received.
>
>
> Does this UserID fetched from the received message's header has to be set to
> the reply message header - so as to make reply in synch with the particular
> sender client?

No - the broker sets this header. It is overrided by the broker so
whatever a client specifies will be ignored.


> Also, I am not getting any function as such in my set of OpenWire APIs to
> retreive the JMSXUserID from the message header. There are functions for
> manipulating other header options but not for JMSXUserID. My openwire APIs
> are from above mentioned svn location. Am I missing on it or it is actually
> not there?

It should appear as a header called "JMSXUserID" on any client
(openwire or stomp).

--

James
-------
http://radio.weblogs.com/0112098/