You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by sparky2708 <da...@columbia.edu> on 2006/08/07 15:10:14 UTC

PLEASE ADD BUG: Queue gets clogged in OpenWire.NET when using Listener

Updated the client just now. This seems like a confirmed bug in OpenWire.NET
but I can't figure out how to submit this using your bug tracking software.
Please submit this for me. Easiest way to reproduce the bug would be to
start the consumer using the following code and then AFTER the consumer
starts, start some producer (either java or C#) and you will notice that the
consumer will not get any messages (seems like calling Receive() on the
consumer at least once will make you lose a message but the listener will
kick back in):

using System;
using ActiveMQ;
using ActiveMQ.Commands;
using NMS;

namespace JMSClient
{
    /// <summary>
    /// Summary description for Class1.
    /// </summary>
    class Class1
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            IConnectionFactory factory = new ConnectionFactory(new
Uri("tcp://localhost:61616?jms.useAsyncSend=true"));
            using (IConnection connection = factory.CreateConnection())
            {
                Console.WriteLine("Created a connection!");

                ISession session = connection.CreateSession();
                IDestination destination =
session.GetQueue("EXCEL.TESTQUEUE");
                Console.WriteLine("Using destination: " + destination);

                // lets create a consumer and producer
                IMessageConsumer consumer =
session.CreateConsumer(destination);
                consumer.Listener += new MessageListener(consumer_Listener);

                while (true);
            }
        }

        static void consumer_Listener(IMessage message)
        {
            if (message == null)
            {
                Console.WriteLine("No message received!");
            }
            else
            { 
                Console.WriteLine("Received message with text: " +
((ActiveMQTextMessage)message).Text);
            }
         }
    }
}



-- 
View this message in context: http://www.nabble.com/Queue-gets-clogged-in-OpenWire.NET-when-using-Listener-tf2051829.html#a5684650
Sent from the ActiveMQ - User forum at Nabble.com.


Re: PLEASE ADD BUG: Queue gets clogged in OpenWire.NET when using Listener

Posted by sparky2708 <da...@columbia.edu>.
Will try it out next week and will definitely let you know! Thank you very
much!


James.Strachan wrote:
> 
> This issue is now resolved in SVN trunk if you want to try it out
> 
> On 8/7/06, sparky2708 <da...@columbia.edu> wrote:
>>
>> added to JIRA
>> --
>> View this message in context:
>> http://www.nabble.com/Queue-gets-clogged-in-OpenWire.NET-when-using-Listener-tf2051829.html#a5687762
>> Sent from the ActiveMQ - User forum at Nabble.com.
>>
>>
> 
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: http://www.nabble.com/Queue-gets-clogged-in-OpenWire.NET-when-using-Listener-tf2051829.html#a5860758
Sent from the ActiveMQ - User forum at Nabble.com.


Re: PLEASE ADD BUG: Queue gets clogged in OpenWire.NET when using Listener

Posted by James Strachan <ja...@gmail.com>.
This issue is now resolved in SVN trunk if you want to try it out

On 8/7/06, sparky2708 <da...@columbia.edu> wrote:
>
> added to JIRA
> --
> View this message in context: http://www.nabble.com/Queue-gets-clogged-in-OpenWire.NET-when-using-Listener-tf2051829.html#a5687762
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Re: PLEASE ADD BUG: Queue gets clogged in OpenWire.NET when using Listener

Posted by sparky2708 <da...@columbia.edu>.
added to JIRA
-- 
View this message in context: http://www.nabble.com/Queue-gets-clogged-in-OpenWire.NET-when-using-Listener-tf2051829.html#a5687762
Sent from the ActiveMQ - User forum at Nabble.com.


Re: PLEASE ADD BUG: Queue gets clogged in OpenWire.NET when using Listener

Posted by sparky2708 <da...@columbia.edu>.
Switched to using Topics and this bug seems gone. Is there something
fundamentally different between Topics and Queue that is creating this
behavior? Maybe I am unaware of some nuance?
-- 
View this message in context: http://www.nabble.com/Queue-gets-clogged-in-OpenWire.NET-when-using-Listener-tf2051829.html#a5685915
Sent from the ActiveMQ - User forum at Nabble.com.


Re: PLEASE ADD BUG: Queue gets clogged in OpenWire.NET when using Listener

Posted by sparky2708 <da...@columbia.edu>.
I thought of a hack for this problem (see my code above for original code).
It's not great but it kicks in the listener and doesn't lose messages:

 // lets create a consumer and producer
 IMessageConsumer consumer = session.CreateConsumer(destination); 
 consumer.Listener += new MessageListener(consumer_Listener); 
 _consumer_Listener(_consumer.ReceiveNoWait());
-- 
View this message in context: http://www.nabble.com/Queue-gets-clogged-in-OpenWire.NET-when-using-Listener-tf2051829.html#a5685151
Sent from the ActiveMQ - User forum at Nabble.com.


Re: PLEASE ADD BUG: Queue gets clogged in OpenWire.NET when using Listener

Posted by sparky2708 <da...@columbia.edu>.
Hi, 
I was also wondering what you think might be a possible timeframe for a fix
for this sort of an issue. As I am still evaluating ActiveMQ for suitability
for our organization I believe my project manager would consider this a
show-stopper bug as we have a lot of tools in C#. We are overall pleased
with our testing of ActiveMQ and would really like to see this work so
please confirm the bug (maybe I am doing something wrong in my code?)
-- 
View this message in context: http://www.nabble.com/Queue-gets-clogged-in-OpenWire.NET-when-using-Listener-tf2051829.html#a5684833
Sent from the ActiveMQ - User forum at Nabble.com.