Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 16936 invoked from network); 6 Aug 2010 14:33:15 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Aug 2010 14:33:15 -0000 Received: (qmail 36826 invoked by uid 500); 6 Aug 2010 14:33:15 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 36797 invoked by uid 500); 6 Aug 2010 14:33:13 -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 36779 invoked by uid 99); 6 Aug 2010 14:33:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Aug 2010 14:33:13 +0000 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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Aug 2010 14:33:10 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o76EWm7F008106 for ; Fri, 6 Aug 2010 14:32:49 GMT Message-ID: <704914.771281105168917.JavaMail.jira@thor> Date: Fri, 6 Aug 2010 10:32:48 -0400 (EDT) From: "Gary Tully (JIRA)" To: dev@activemq.apache.org Subject: [jira] Resolved: (AMQ-2125) javax.jms.JMSException: Could not correlate acknowledgment with dispatched message thrown on failover In-Reply-To: <155794312.1234959539368.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/AMQ-2125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gary Tully resolved AMQ-2125. ----------------------------- Assignee: Gary Tully Resolution: Fixed log message at warn level in 5.4 r982990 > javax.jms.JMSException: Could not correlate acknowledgment with dispatched message thrown on failover > ----------------------------------------------------------------------------------------------------- > > Key: AMQ-2125 > URL: https://issues.apache.org/activemq/browse/AMQ-2125 > Project: ActiveMQ > Issue Type: Bug > Components: Broker > Affects Versions: 5.2.0 > Environment: MacOS 10.5 and Solaris 10 > Reporter: Team Hiro > Assignee: Gary Tully > Fix For: 5.4.0 > > > When failing over to a new broker we see this exception. Although the exception is thrown no messages seem to be lost. > This can be reproduced using the following unit test and this setup: > 1. Create two activemq's using the same datasource. > 2. Run the test > 3. Kill the first active mq before the test completes (after you see the first Recieved Message... in the system out) > 4. See the exception thrown in the second activemq log > import org.apache.activemq.ActiveMQConnectionFactory; > import javax.jms.*; > import static javax.jms.Session.AUTO_ACKNOWLEDGE; > import static javax.jms.Session.SESSION_TRANSACTED; > import junit.framework.TestCase; > import java.util.concurrent.atomic.AtomicInteger; > public class BrokerTest extends TestCase { > public void testFoo() throws Exception { > ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("failover:(tcp://localhost:61616,tcp://localhost:61617)"); > Connection connection = connectionFactory.createConnection(); > connection.start(); > Session producerSession = connection.createSession(false, AUTO_ACKNOWLEDGE); > MessageProducer producer = producerSession.createProducer(producerSession.createQueue("testQueue")); > for (int i = 0; i < 100; i++) { > System.out.println("Sending messages"); > producer.send(producerSession.createTextMessage("Hello")); > } > final AtomicInteger atomicInteger = new AtomicInteger(0); > final Session consumerSession = connection.createSession(true, SESSION_TRANSACTED); > MessageConsumer messageConsumer = consumerSession.createConsumer(consumerSession.createQueue("testQueue")); > messageConsumer.setMessageListener(new MessageListener() { > public void onMessage(Message message) { > try { > System.out.println("Received Message" + message); > Thread.sleep(1000); > atomicInteger.addAndGet(1); > System.out.println(atomicInteger.get()); > consumerSession.commit(); > } catch (Exception e) { > throw new RuntimeException("Oh dear", e); > } > } > }); > Thread.sleep(2 * 60 * 1000); > assertEquals(100, atomicInteger.get()); > } > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.