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.

Reply via email to