3 Replies Latest reply on Jun 15, 2012 8:35 AM by Andy Taylor

    Resource adapter not reconnecting to HornetQ server

    saifeldeen X Newbie

      Hi all,

       

      My setup is as follows: 2 instances of JBoss 6.1.0-Final running in a cluster using HornetQ 2.2.5 - call them A and B.  A and B publish messages to a queue called "testQueue".  I then have a third JBoss 6.1.0-Final (call it C) that is outside the cluster (it is basically an independent JBoss instance).  JBoss C has an MDB listening to "testQueue" on A and B via discovery groups using a resource adapter. 

       

      The scenario that I have is I run JBoss instance A and C (not B).  I publish several messages on testQueue.  JBoss C's MDB receives messages from the testQueue on JBoss instance A just fine.  I then startup JBoss instance B and wait for it to start completely.  I then shutdown JBoss instance A.  I send several messages from JBoss instance B.  JBoss instance C doesn't appear to receive any messages from JBoss instance B.  I do not understand why this is as C listens to the discovery group specified by A and B.  The only warning produced by HornetQ is the following:

       

      WARNING [org.hornetq.core.protocol.core.impl.RemotingConnectionImpl] Connection failure has been detected: The connection was disconnected because of server shutdown [code=4]

       

      The same is true when I start A, B and C.  I then shutdown A in which C listens to B.  But I restart A and shutdown B and C no longer receives messages.

       

      I understood from the doco that the resource adapter should be able to connect using discovery groups, however, this doesn't seem to be the case...  Having looked at some previous posts, e.g. https://community.jboss.org/thread/174199?tstart=0, I am thinking that perhaps reconnection is not possible when the JBoss server shutsdown and that failover should be implemented instead...  Please advise if this is the case...

       

      Attached are:

      • Instance A and B hornetq configuration (hornetq-configuration.xml, hornetq-jboss-beans.xml, hornetq-jms.xml, jms-ds.xml)
      • Instance C hornetq configuration (jms-remote-ds.xml and ra.xml)

       

      Any help would be appreciated...