activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Fernandez <>
Subject Re: Sending message to specific recipients based on username
Date Fri, 12 Sep 2008 01:53:32 GMT

You can use a combination of message property and selector. For example, your
producer defines a  message property - call it 'consumerName' - and sets its
value to that of the target consumer's username.  The consumer can then use
a selector to read only those messages with a consumerName property having a
value equal to its username.

Or you can have each consumer read off a queue whose physical name matches
its username and then implement a content based router pattern.

Get a free ActiveMQ user guide @ 


kenjackson wrote:
> Hi,
> I'm an ActiveMQ newbie and I searched through the documentation, but I'm
> not sure if the functionality I was looking for is available.  
> Is there any way to have subscribers to a queue or topic get messages
> based on their username?  For example, if I have two users connected to a
> topic, can I push a message onto the queue such that only one of them will
> receive this message?
> I tried searching under "Security" but this deals with strictly
> authentication, but I wasn't sure if there was a way to send messages to
> specific users.
> Thanks,
> Ken

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

View raw message