Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 74913 invoked from network); 23 Aug 2008 23:49:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Aug 2008 23:49:43 -0000 Received: (qmail 16938 invoked by uid 500); 23 Aug 2008 23:49:41 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 16903 invoked by uid 500); 23 Aug 2008 23:49:41 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 16892 invoked by uid 99); 23 Aug 2008 23:49:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 23 Aug 2008 16:49:41 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 23 Aug 2008 23:48:53 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A51D6234C1B1 for ; Sat, 23 Aug 2008 16:48:52 -0700 (PDT) Message-ID: <188704329.1219535332674.JavaMail.jira@brutus> Date: Sat, 23 Aug 2008 16:48:52 -0700 (PDT) From: "Timothy Bish (JIRA)" To: dev@activemq.apache.org Subject: [jira] Assigned: (AMQCPP-195) Message stuck in queue when using transactional sessions In-Reply-To: <1347695244.1219418932584.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/AMQCPP-195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Timothy Bish reassigned AMQCPP-195: ----------------------------------- Assignee: Timothy Bish (was: Nathan Mittler) > Message stuck in queue when using transactional sessions > -------------------------------------------------------- > > Key: AMQCPP-195 > URL: https://issues.apache.org/activemq/browse/AMQCPP-195 > Project: ActiveMQ C++ Client > Issue Type: Bug > Components: CMS Impl, Openwire > Affects Versions: 2.2 > Environment: ActiveMQ-CPP 2.2 with ActiveMQ 5.1 Broker. > Reporter: Timothy Bish > Assignee: Timothy Bish > Fix For: 2.2.1 > > > Here is what I have now done. > I used Examples/Producers/SimpleProducer.cpp to put 2000 messages onto the > queue TEST.FOO. > I then ran up Examples/Consumers/SimpleAsyncConsumer.cpp in it's default > autoack mode and it consumed all 2000 messages off the queue. > I then modified it and made the following changes: > In RunConsumer > // Create a Session > /* > if( clientAck ) { > session = connection->createSession( > Session::CLIENT_ACKNOWLEDGE ); > } else { > session = connection->createSession( > Session::AUTO_ACKNOWLEDGE ); > } > */ > session = connection->createSession( Session::SESSION_TRANSACTED > ); > This will force the session to be transactional > Then in onMessage > /* > if( clientAck ) { > message->acknowledge(); > } > */ > this->session->commit(); > When I then run the example - if looks like the messages are processed > normally but message #1 is left on the queue. > If I run the exe a second time it outputs message #1 to standard out but > looking at the queue in jconsole the message is still there. > I can keep running the exe over and over and it outputs message#1 to stdout > but never removes it off the queue. This is the situation I'm seeing in my > own project. > For completeness I went back to autoack and the message was consumed and > removed from the queue. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.