activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pPolak <ala...@centrum.sk>
Subject C# client stops receiving messages after getting ~400 of them
Date Thu, 10 Sep 2009 11:37:43 GMT

Hi,

 I need help with this scenario:
* two clients connecting to the same broker, one written in JAVA, the other
one in C#
* there are two queues, SentByJava and SentByCSharp
* both clients have a consumer and a producer
* JAVA producer sends messages to the SentByJava queue, C# producer sends
messages to the SentByCSharp queue
* JAVA consumer gets messages from the SentByCSharp queue, C# consumer gets
messages from the SentByJava queue

JAVA client works fine. C# client has a problem with its consumer: after
some time the consumer stops getting messages. "Some time" is  less than 10
seconds from start, about 400 messages are usually successfully received. It
does not matter whether the JAVA client is running or not, nor does it
matter whether the C# client's producer is running or not. It happens even
when I run only the C# client with producer part commented out.

I use this url to connect: failover:(tcp://WSSK809001:61616)
The consumer runs in its own thread and basically just loops and gets
messages:

      private void ConsumeMessages()
      {
         while (!stopRequested)
         {
            Thread.Sleep(10);
            IMessage message =
consumer.Receive(TimeSpan.FromMilliseconds(100));
            if (message != null)
            {
               //trigger the OnMessageReceived event
               OnMessageReceived(message);
            }
         }

I really have no idea what to do with this :( I tried increasing the
Thread.Sleep() milliseconds to 100 - did not help.

Did any of you experience something like this? Thanx for any help.

Peter.
-- 
View this message in context: http://www.nabble.com/C--client-stops-receiving-messages-after-getting-%7E400-of-them-tp25381671p25381671.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message