0 Replies Latest reply on Feb 10, 2011 12:01 PM by Brian L

    Stomp subcription to HornetQ queue problem

    Brian L Newbie

      Hello all, I have a weird error so let me try to explain.


      I am using a simple java client to connect, send and subcribe to queues.


      If I subcribe to a jms queue,  there is no problem. They send and receive perfectly fine.


      The problem is with a hornetq queue, defined like this in hornetq-configuration.xml :


              <queue name="queue.stomp.Inbound">


      And with a small java program that uses the stomp protocol: gozirra stomp client



      Map res = null;
      res = subscribe(c,listenQueue);
      c.send(destQueue, temp);
      result = (ArrayList<String>) res.get("MESSAGE");
      for (String s : result){
           System.out.println("Messages received from queue : " + s);

      This is just a small snippet of the code that is simplified for this example.


      where all the variables are inputted correctly. Works fine with jms queues, but not the HornetQ queues.


      I also stepped through the process and when I am not subscribing, I see messages pile up on the queue through the jmx console. However the moment I subscribe, they are all gone and the returning Map is empty.


      Does anyone have any insight to this situation?


      Thanks in advance