You put a custom header=value in when sending the message. In the consumer you specify the selectors to use when subscribing to the queue.
You might want to consider using a queue per message type. If you don't want the producer to know in advance which queue is for which type of message, you could have a content based router to take each message and send it out on the right queue. HTH. James On 10 December 2010 17:11, madhavi <madhavi.sreeran...@gmail.com> wrote: > > I am using ActiveMQ Queue for messaging. There is one producer for this > queue > and multiple consumers. I want to put some restriction on message, so that > only one particular consumer can consume the message. I am trying to figure > out on how to setup the Message Selectors on a JMS Queue Receiver(Message > Consumer). Or can we set the message selector from producer side. Which is > the correct way. Any suggestions.. please > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/How-to-setup-the-Message-Selectors-on-MessageConsumer-tp3082340p3082340.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >