activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Xie <ant_mira...@163.com>
Subject Re: Message recieved but can't removed from the amq server problem
Date Fri, 21 Jul 2006 07:52:53 GMT

I think i found the problem why the message recieved but still live in mq
server by  asynchronous approach using AutoAcknowledge mode.

here is changes in MessageConsumer.cs

        /// <summary>
        /// Dispatch any pending messages to the asynchronous listener
        /// </summary>
        public void DispatchAsyncMessages()
        {
            while (Listener != null)
            {
                IMessage message = dispatcher.DequeueNoWait();
                if (message != null)
                {
                    //here we add the code that if do acknowledge action.
                    message = AutoAcknowledge(message);
                    Listener(message);
                }
                else
                {
                    break;
                }
            }
        }

Then rebuild the project and run the test. it should be works.

Matt.

-- 
View this message in context: http://www.nabble.com/Message-recieved-but-can%27t-removed-from-the-amq-server-problem-tf1964193.html#a5429771
Sent from the ActiveMQ - User forum at Nabble.com.


Mime
View raw message