JMS Client Pulling Messsage From General Queue

Somewhat generic question:

Hello, am considering a JMS setup where I have a queue on a server for all attached clients to pull messages from based on a filter.

I was thinking of using a clientID generated by a server a filter for messages. Hoever, if a client needs to recieve this clientID in a message then filtering on that first message becomes a problem.

What is the accepted solution to this problem?

Thanks for help with this generic question,

Kevin

[500 byte] By [urciolo] at [2007-9-26 3:59:25]
# 1

Instead of working with a client identifier at the message level, you can work with a client identifier at the connection level.

JMS specificatins facilitate this through the so called durable subscriptions.

As an administrator, you create a specific connection factory for your need and that time associate a client identifier to it. You publish(by word of mouth or otherwise) this client ID.

Client programs obtain topic connections using that newly created connection factory, obtain a topic session, and then call javax.jms.TopicSessioncreateDurableSubscriber(topic, subscriptionName, messageSelector, noLocal)

Notice that the clients still use messageSelector. So will get only the relevant messages.

neville_sequeira at 2007-6-29 12:53:26 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...