You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by vince-el-matador <vi...@swapstream.net> on 2006/05/23 15:45:13 UTC

Openwire client hangs after receiving 999 messages

using .NET 2.0 ,C# + trunk, the consumer async call back hangs at 999th call
!

Here is the code :
    public void allInOne()
    {
      ISession session;
      IDestination destination;
      IConnectionFactory factory;
      IMessageProducer producer;
      IMessageConsumer consumer;

      int maxIteration = 5000;

      factory = new ConnectionFactory(new Uri("tcp://locahost:61616"));
      using (IConnection connection = factory.CreateConnection())
      {
        session = connection.CreateSession();
        destination = session.GetTopic("SampleTopic");

        producer = session.CreateProducer(destination);
        producer.Persistent = false;
        consumer = session.CreateConsumer(destination);        
        consumer.Listener += new MessageListener(OnMessage);

        for (int i = 0; i < maxIteration; i++)
        {
          string s = string.Format("Hello World! {0}", i);
          ITextMessage request = session.CreateTextMessage(s);
          producer.Send(request);

        }
      }
    }


    protected void OnMessage(IMessage message)
    {
      ActiveMQTextMessage msg = message as ActiveMQTextMessage;
    }
--
View this message in context: http://www.nabble.com/Openwire+client+hangs+after+receiving++999+messages-t1669025.html#a4523232
Sent from the ActiveMQ - Dev forum at Nabble.com.


Re: Openwire client hangs after receiving 999 messages

Posted by Hiram Chirino <hi...@hiramchirino.com>.
Looks like acks are not being sent back to the broker.  Please file a JIRA.

On 5/23/06, vince-el-matador <vi...@swapstream.net> wrote:
>
> This has to see with Session.prefetchSize (that is 1000) by default.
> making Session.prefetchSize=2000 makes it hanging at message 1999 ! :-)
>
> --
> View this message in context: http://www.nabble.com/Openwire+client+hangs+after+receiving++999+messages-t1669025.html#a4523497
> Sent from the ActiveMQ - Dev forum at Nabble.com.
>
>


-- 
Regards,
Hiram

Re: Openwire client hangs after receiving 999 messages

Posted by vince-el-matador <vi...@swapstream.net>.
This has to see with Session.prefetchSize (that is 1000) by default.
making Session.prefetchSize=2000 makes it hanging at message 1999 ! :-)

--
View this message in context: http://www.nabble.com/Openwire+client+hangs+after+receiving++999+messages-t1669025.html#a4523497
Sent from the ActiveMQ - Dev forum at Nabble.com.