Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A9B5C78EE for ; Fri, 16 Sep 2011 19:06:35 +0000 (UTC) Received: (qmail 56441 invoked by uid 500); 16 Sep 2011 19:06:35 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 56376 invoked by uid 500); 16 Sep 2011 19:06:35 -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 56360 invoked by uid 99); 16 Sep 2011 19:06:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Sep 2011 19:06:35 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Sep 2011 19:06:32 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id AF1AB9D018 for ; Fri, 16 Sep 2011 19:06:11 +0000 (UTC) Date: Fri, 16 Sep 2011 19:06:11 +0000 (UTC) From: "Timothy Bish (JIRA)" To: dev@activemq.apache.org Message-ID: <1002514729.36014.1316199971713.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <931206033.23261.1315363149939.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (AMQ-3485) Transacted Session returns invalid MessageConsumer after the first MessageConsumer for the same destiantion. Bug introduced in 5.5.0 - working ok in 4.1.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AMQ-3485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13106714#comment-13106714 ] Timothy Bish commented on AMQ-3485: ----------------------------------- You can create as many consumers as you'd like but they won't consumer messages that have already been consumed in that transaction, you need to first rollback the transaction before a message will be redelivered. > Transacted Session returns invalid MessageConsumer after the first MessageConsumer for the same destiantion. Bug introduced in 5.5.0 - working ok in 4.1.2 > ---------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: AMQ-3485 > URL: https://issues.apache.org/jira/browse/AMQ-3485 > Project: ActiveMQ > Issue Type: Bug > Components: JMS client > Affects Versions: 5.5.0 > Reporter: Pablo La Greca > Attachments: activemq-issue-test-case.zip > > > When I have a transacted Session, as it is single threaded I can't create two MessageConsumer to the same Destination. But if I create a MessageConsumer to a Destination and then I close it, then I should be able to create a new MessageConsumer to the same Destination. This is working fine in active mq 4.1.2 but it doesn't work in 5.5.0. It allows to create a second MessageConsumer but that seconde MessageConsumer always returns null when the queue has messages. > i.e: > Session session = .... //transacted session > Destination dest = .... > MessageConsumer mc = session.createMessageConsumer(dest); > Message message = mc.receive(); // message received ok > mc.close(); > mc = session.createMessageConsumer(dest); > Message message = mc.receive(); // message is null > Thanks, Pablo. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira