2 Replies Latest reply on Apr 5, 2011 11:37 AM by bl5536

    Stomp consumer reliability

    bl5536

      Hello all, I have a problem when I have a simple Apache NMS Stomp client that will connect, create a producer, send the message, create a consumer, receive the message, ACK the message, then close out all the connections. I put it in a while forever loop to see how long it could last.

       

      No matter how many trials I do, it happens to hang up when trying to create a consumer. The number of trials can range anywhere from 1 to 300+

       

      It always fails when it tries to create a consumer on the following line of my code:

       

      consumer = session.CreateConsumer(new Apache.NMS.Stomp.Commands.Queue(queueName), null);
      

       

      I have attached my C# code that also includes the libraries for the NMS stomp client in a visual C# project. Main is located in Test.cs

       

      I am currently using HornetQ 2.2.2 Final attached to JBoss 5.1.0 GA on a Linux server with only 2 modifications to the config files.

      1. Adding stomp-acceptor in the hornetq-config.xml

       

      <acceptor name="stomp-acceptor">
               <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>        
               <param key="protocol" value="stomp" />
               <param key="host" value="${jboss.bind.address:localhost}"/>
               <param key="port" value="61613" />
      </acceptor> 
      
      

      2. Adding queue names in the same hornetq-config.xml

       

      <queues>
               <queue name="exampleA">
                     <address>/queue/exampleA</address>
               </queue>
      
      </queues>
      
      

       

       

      Other than that, everything is using their default configurations.

      If someone would not mind downloading my source code and testing it, it would be appreciated. Main is located in Test.cs

      Thank you

        • 1. Stomp consumer reliability
          clebert.suconic

          My MSDN license is expired. I think I will need some time before I could reactivate it.

           

          Do you think you could produce a java example replicating this? I will look along the week.

          • 2. Re: Stomp consumer reliability
            bl5536

            Thanks for the reply.

            Hmm after producing a java example using the Stomp libary included in Apache ActiveMQ (example http://activemq.apache.org/stomp.html  under JAVA API), I achieve perfect results going into the 2000+ trials range.

             

            Now the problem I assume is with the Apache NMS stomp client since their Java client seems to be working fine. I will take this problem over to Apache and let them know, but I'll keep this updated if I find anything related to Hornet Q