5 Replies Latest reply on Dec 3, 2009 4:08 PM by Vinay Pothnis

    HornetQ Cluster: Problem in message delivery

    Vinay Pothnis Newbie

      The setup:
      1. HornetQ Cluster with 2 HornetQ servers running on the same machine. Server Discovery using UDP.

      2. There is a producer that does the following in each invokation:
      - Gets a connection from the connection pool (of 2 connections)
      - Creates a temporary queue (say Tq)
      - Posts a message to a well known queue (RequestQueue) on the HornetQ cluster. In the message, the JMSReplyTo is assigned the temporary queue.
      - Creates a consumer that is associated with the temporary queue.
      - Waits for the response/reply on the temporary queue and prints out the response.

      3. There is a consumer that has a connection pool (of 2 connections) as well as a pool of message listeners.
      - The message listeners are associated with the well known queue (RequestQueue)
      - When a message is delivered to the listener, the listener extracts the JMSReplyTo and then sends a reply to that destination.

      The producer and consumer are also on the same machine.
      I was trying to test this setup using JMeter scripts. The following are the observations:

       Single HornetQServer HornetQCluster(2 servers)
      Test 1:
      (1 Thread 3000 runs) Test Complete Test Complete
      Test 2:
      (2 Threads 200 runs/thread) Test Complete Test Stops after some arbitrary number of runs.

      When the logs are analysed, the producer is waiting for reply on one of the temporary queue. Looked like the message posted on the RequestQueue for this run was not consumed by the consumer at all.

      This behaviour is consistently reproducible although it stops after different number of runs.
      Is there anything that I am doing wrong? Any pointers as to why this might be happening?