From dev-return-12178-apmail-activemq-dev-archive=activemq.apache.org@activemq.apache.org Wed Sep 03 22:08:15 2008 Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 32941 invoked from network); 3 Sep 2008 22:08:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Sep 2008 22:08:15 -0000 Received: (qmail 67963 invoked by uid 500); 3 Sep 2008 22:08:12 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 67899 invoked by uid 500); 3 Sep 2008 22:08:12 -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 67885 invoked by uid 99); 3 Sep 2008 22:08:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Sep 2008 15:08:12 -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; Wed, 03 Sep 2008 22:07:22 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 91136234C1CF for ; Wed, 3 Sep 2008 15:07:53 -0700 (PDT) Message-ID: <424192689.1220479673593.JavaMail.jira@brutus> Date: Wed, 3 Sep 2008 15:07:53 -0700 (PDT) From: "Vadim Katz (JIRA)" To: dev@activemq.apache.org Subject: [jira] Commented: (AMQ-1710) Failing over in JDBC Master/Slave topology does not preserve transaction state In-Reply-To: <347248383.1210018183511.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/AMQ-1710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45367#action_45367 ] Vadim Katz commented on AMQ-1710: --------------------------------- Thank you for suggesting a patch, Mario. I have applied it but received the following exception in the slave broker {code} 008-09-03 14:49:58,835 [/127.0.0.1:4038] ERROR Service - Async error occurred: javax.jms.JMSException: Could not correlate acknowledgment with dispatched message: MessageAck {commandId = 3709, responseRequired = false, ackType = 0, consumerId = ID:VKATZ-XP1-3975-1220478455256-0:0:4:1, firstMessageId = null, lastMessageId = ID:VKATZ-XP1-3975-1220478455256-0:0:26:1:10, destination = queue://convert.input, transactionId = TX:ID:VKATZ-XP1-3975-1220478455256-0:0:10, messageCount = 1} javax.jms.JMSException: Could not correlate acknowledgment with dispatched message: MessageAck {commandId = 3709, responseRequired = false, ackType = 0, consumerId = ID:VKATZ-XP1-3975-1220478455256-0:0:4:1, firstMessageId = null, lastMessageId = ID:VKATZ-XP1-3975-1220478455256-0:0:26:1:10, destination = queue://convert.input, transactionId = TX:ID:VKATZ-XP1-3975-1220478455256-0:0:10, messageCount = 1} at org.apache.activemq.broker.region.PrefetchSubscription.acknowledge(PrefetchSubscription.java:279) at org.apache.activemq.broker.region.AbstractRegion.acknowledge(AbstractRegion.java:364) at org.apache.activemq.broker.region.RegionBroker.acknowledge(RegionBroker.java:470) at org.apache.activemq.broker.TransactionBroker.acknowledge(TransactionBroker.java:194) at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:73) at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:73) at org.apache.activemq.broker.MutableBrokerFilter.acknowledge(MutableBrokerFilter.java:84) at org.apache.activemq.broker.TransportConnection.processMessageAck(TransportConnection.java:443) at org.apache.activemq.command.MessageAck.visit(MessageAck.java:196) at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292) at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:180) at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68) at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:143) at org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:206) at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84) at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:196) at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:183) at java.lang.Thread.run(Thread.java:619) I've tested it with amq-5.1.0 and spring-2.5.5 with locally transacted session. Also, even though the slave broker becomes active it hangs after throwing the exception and stops accepting new connections. thanks, vadim {code} > Failing over in JDBC Master/Slave topology does not preserve transaction state > ------------------------------------------------------------------------------ > > Key: AMQ-1710 > URL: https://issues.apache.org/activemq/browse/AMQ-1710 > Project: ActiveMQ > Issue Type: Bug > Components: Broker, Transport > Affects Versions: 4.1.2 > Environment: Tested on 4.1.1 and 4.1.2 > Reporter: Rob Bugh > Attachments: AMQ-1710.patch, FailoverTest.java > > > Recreate steps: > 1) Start two brokers in JDBC Master/Slave topology > 2) Create an app that puts two or more messages in a queue (two messages are sufficient). Give each message a JMXGroupID to force them to go to the same consumer. > 3) Create another app that creates two connection to the broker and on each connection creates a session and a consumer with a unique clientID. Each should attempt to consume messages from the queue defined above. > 4) Run the app and when the first message is consumed stop the master. Failover will occur and the slave becomes the new master. > 5) Notice that when the transport resumes in the client that received the first message an exception like the following is thrown: > javax.jms.JMSException: Transaction 'TX:ID:HOSTNAME-3289-1210016021661-0:1:1' has not been started. > 6) Notice that the second consumer now recieves both messages. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.