7 Replies Latest reply on May 7, 2013 4:55 AM by Andy Taylor

    HornetQ JMS Topic & GroupId problem on failover

    Gábor Trexler Newbie

      Hi all,

       

      I have the following scenario.

      We have a topic where the server places notifications for clients. We absolutely need to be sure of message ordering and we don't want to miss any messages in case the client get disconnected for any reason. So we use durable subscriptions and GroupIds. This works well, messages are received always in sequential order and after a reconnection messages are always received.

       

      Now we want to enable clustering (symmetric cluster with colocated backup) and there come the problems. This works in clustering as well, until a failover happens.

      When the node dies where our subscription is and a failover happens during the time the client is disconnected, then after reconnection the client will ALWAYS get connected to another live instance, since JMS connection to a backup instance is not supported. But messages are still sent to the backup instance, since the GroupId pins this durable subscription there. I.e. messages are not received until the dead node comes back again.

       

      Here is our test case:

       

      HA-JNDI client1 with url1,url2

      1. client1 connected with id1
      2. publish 10 msgs with order index – client1 should receive 10msgs in order
      3. check which node has the subscriber
      4. disconnect client1
      5. publish 10 msgs with order index – msgs should be visible as durable messages
      6. kill jboss instance on the node from step3
      7. publish 10 msgs with order index - msgs should be visible as durable messages
      8. reconnect client1 with id1 – client1 should receive 20msgs in order

       

      Messages are not received in the last step.

       

      We do think this is a problem with HornetQ and this should work.

       

      Do you have any idea how this use case could be made to work?

       

      Thanks for any input!