activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessezbj <jesse...@hotmail.com>
Subject How to create connections to different brokers by using one ConnectionFactory?
Date Thu, 15 Sep 2011 02:35:03 GMT
How to create connections to different brokers by using one
ConnectionFactory?

Can the code be written as

ActiveMQConnectionFactory connectionFactory = new
ActiveMQConnectionFactory();

for each url in URLs {
connectionFactory.setBrokerURL(url);
Connection connection = connectionFactory.createConnection();
connection.start();
}

And is there any other  better way to manage multiple connections (to
different brokers) in one client (which can save resources on the client,
save the scheduling overhead, and so on.

Thanks...

--
View this message in context: http://activemq.2283324.n4.nabble.com/How-to-create-connections-to-different-brokers-by-using-one-ConnectionFactory-tp3814559p3814559.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message