0 Replies Latest reply on Feb 20, 2014 4:27 AM by bbuterbrott

    stop-gateway and hornetq question

    bbuterbrott

      I have a question regarding stop-gateway command in jboss-cli for subsystem switchyard.

       

      I have 2 nodes of jboss-eap-6.1 with switchyard (sy1, sy2). On each server I configured two hornetQ servers (active and passive). Configurations are attached below. I've deployed simple consumer composite with HornetQ service on each jboss. On the second node (sy2) I've deployed simple producer composite with HornetQ reference.

       

      I am doing the folowing test case:

      1) Start each jboss (clean, without data and tmp folders).

      2) Start producer composite to infinetly send messages to testQueue. Messages are load balanced between sy1 and sy2 nodes.

      3) Stop the service of sy1 consumer composite. Running the command:

      /opt/jboss-eap-6.1/bin/jboss-cli.sh -c --controller=192.168.100.95:9999 /subsystem=switchyard:stop-gateway\(name=\"_TestConsumerService_jca_1\",service-name=\"{urn:org.me:switchyard-composite-test-consumer:1.0}TestConsumerService\",application-name=\"{urn:org.me:switchyard-composite-test-consumer:1.0}switchyard-composite-test-consumer\"\)

      4) After that all the messages started to go to the sy2.

      5) Start the service of sy1 consumer composite. Running the command:

      /opt/jboss-eap-6.1/bin/jboss-cli.sh -c --controller=192.168.100.95:9999 /subsystem=switchyard:start-gateway\(name=\"_TestConsumerService_jca_1\",service-name=\"{urn:org.me:switchyard-composite-test-consumer:1.0}TestConsumerService\",application-name=\"{urn:org.me:switchyard-composite-test-consumer:1.0}switchyard-composite-test-consumer\"\)

      6) After that all the messages get load balanced between sy1 and sy2 nodes.

      7) Stop the service of sy1 consumer composite. As in 3 and wait for 100 seconds.

      8) Then I stop sy1 node. Delete tmp and data folders from it. And then start it again.

      9) Messages are load balanced between sy1 and sy2 nodes.

      10) I stop the service on sy1 consumer composite again.

      11) This is the part where the fun begins. Some first messages after stop get lost. As in this example:

       

      sy1sy2
      01
      23
      45
      stop
      7
      8
      9

       

      And sometimes even messages aren't received on sy2 node (as if load balancing stops working, but this rarely happens).

       

      I test this function because I need the possibility to stop one node of JBoss to restart it without loosing any data.

       

      So the question is:

      What is possible problem of this behaviour?

       

      As an addition I must say that the case with stopping and starting gateway, without rebooting the JBoss, all works just as expected.

       

      Message was edited by: Denis Kozlov