[jboss-user] [JBoss Messaging] - Connecting to two JBoss messaging servers causes interferenc

davidrh do-not-reply at jboss.com
Wed Nov 8 01:38:05 EST 2006


We are having problems getting JBoss to work when we have a connection from the one client to two JBoss messaging servers simultaneously.  Everything works fine initially, but if one server goes down the client connections to the good server are also disconnected.  This situation (i.e. one server going down) is the reason why we have multiple connections.

Some background: In our application, we have implemented high availability in our messaging client by maintaining a connection to two (or more) JMS servers simultaneously.  For dispatching of messages, we try the first JMS server and if that doesn't work, we try the second and so on.  For receiving messages, we set up a message listener for each queue on all of the JMS servers. For receiving and sending, we always use the session that received the message to dispatch any subsequent messages.  In this way, we always should have somewhere to send messages and each JMS server will always have listeners to receive messages.  Any messages sent as part of receiving a message will occur in the same JMS transaction and therefore be committed or rolled back as one.

We have ExceptionListeners registered on the connections to handle periodically attempting to reconnect to the JMS server that has failed. For sending messages we use Spring's JmsTemplate backed by a pool of sessions using Apache commons pooling. For receiving messages, we use message listeners.

The problem that we are seeing is reproduced in this post http://www.jboss.org/index.html?module=bb&op=viewtopic&t=93258 which unfortunately has a bit of a vague subject and hasn't attracted any response.  My apologies for reposting if this lack of response is not caused by the subject.

We successfully employ this strategy with Active MQ and Oracle AQ so we think that our code is workable.  Is there any inherent reason why you can't have one client connecting to two JBoss messaging servers at the same time, without the failure of one connection interfering with the other? Is there anything in the above approach to availability that would be inherently unsound with JBoss Messaging?

Any guidance appreciated.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984008#3984008

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984008



More information about the jboss-user mailing list