0 Replies Latest reply on Nov 20, 2013 11:55 AM by synclpz

    Proper (live+ backup) <--> (live + backup) configuration with EAP 6.1.0 Final

    synclpz

      Hello, I'm trying to figure out how to setup symmetric cluster of hornetq with live-backup replication.

       

      The goals are:

       

      1. To have application which produces messages via looking up JmsXA and creating producers

      2. To have SwitchYard applications that consume messages via hornetq-ra

      3. To have high-available cluster of two JBoss instances for message delivery and persistence

      4. In case of server fail the messages which are "waiting in queue" or "processing in application" should be redistributed to live server to allow consumers process them

       

       

      I ended up with configuring two instances of hornetq-server in each JBoss: one live and one backup. The live instance on server1 is in the same backup-group as the backup instance on server2 and vice-versa. Startup logs show that everything is okay, they see each other and connect to each other. (Configs attached)

       

      Test cases:

       

      Case 1:

        1. Create a producer on server1

        2. Produce 100 messages

        3. Kill server1

        4. Create a consumer on server2

        5. See consumer eating 100 messages

       

      Case 1 = OK.

       

      Case 2:

        1. Create a producer on server1

        2. Create a consumer on server1

        3. Create a consumer on server2

        4. Produce 10000 messages (wait until producer produces all messages, but consumers are still consuming)

        5. See server1's consumer consuming every odd message

        6. See server2's consumer consuming every even message

        7. Kill server1

        8. See the consumer on server2 consumes every even message, but not odd ones!

       

      Wait a little, see logs of server2 found that server1 is down. Still no odd messages on server2!

        9. Start server1

        10. See no odd messages processed at all

       

      Case 2 = Fail!

       

      Case 3:

        1. Eventually kill server1 or server2

        2. JmsXA is not bound after server start, seems like HornetQ is hang during startup

       

      Case 3 - Fail!

       

       

      Pleas help me find the right way to configure that, may be I'm on the wrong road at all? May be my goals could be achieved with another configuration?