Hi,
I am trying to develop an application which involves quite a number of
round-trips. Basically I need to post messages to a particular queue, and
receive messages out of a particular queue.
These queues are to be in a cluster.
My question is how do I obtain connection to the same queue, everytime.
The code i have is:
InitialContext naming = new InitialContext();
// lookup queue connection factory
QueueConnectionFactory connectionFactory =
(QueueConnectionFactory)
naming.lookup(connectionFactoryName);
// create jms connection
QueueConnection connection =
connectionFactory.createQueueConnection();
System.out.println("Connection is:"+ connection);
// lookup jms queue
Queue queue = (Queue) naming.lookup(queueName);
Now, for the first time I do the lookup ...is there anyway I can store the
hostname of the queue, and get the Queue corresponding to the hostname next
time onwards ???
--
View this message in context:
http://www.nabble.com/How-to-post-messages-to-the-same-queue-in-a-Cluster-tf1898012.html#a5192257
Sent from the ActiveMQ - User forum at Nabble.com.