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.

Reply via email to