Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 58063 invoked from network); 6 Nov 2007 14:29:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Nov 2007 14:29:11 -0000 Received: (qmail 53759 invoked by uid 500); 6 Nov 2007 14:28:58 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 53736 invoked by uid 500); 6 Nov 2007 14:28:58 -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 53727 invoked by uid 99); 6 Nov 2007 14:28:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Nov 2007 06:28:58 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Nov 2007 14:28:53 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id EB52D71422B for ; Tue, 6 Nov 2007 06:28:23 -0800 (PST) Message-ID: <4639637.1194359303598.JavaMail.jira@brutus> Date: Tue, 6 Nov 2007 06:28:23 -0800 (PST) From: "Chris Hofstaedter (JIRA)" To: dev@activemq.apache.org Subject: [jira] Created: (AMQ-1488) Bug in FailoverTransport results in messages that have been queued during a network interruption being sent out of order upon call to restoreTransport() MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Bug in FailoverTransport results in messages that have been queued during a network interruption being sent out of order upon call to restoreTransport() -------------------------------------------------------------------------------------------------------------------------------------------------------- Key: AMQ-1488 URL: https://issues.apache.org/activemq/browse/AMQ-1488 Project: ActiveMQ Issue Type: Bug Components: Transport Affects Versions: 4.0.2 Environment: Windows XP, AMQ 4.0.2, Client side message producer to an embedded broker with a failover demand forwarding bridge to a persisting broker Reporter: Chris Hofstaedter FailoverTransport stores all queued messages during network interruptions in a HashMap. When restoreTransport() is called, the map is traversed sending each queued message. However, because the messages are stored in a HashMap, the map is traversed in hash-order - not message id order. Problematic code in FailoverTransport::restoreTransport(): for (Iterator iter2 = requestMap.values().iterator(); iter2.hasNext();) { Command command = (Command) iter2.next(); t.oneway(command); } The following local patch resolves the issue: // Convert the request map to a treemap. It's keyed off of the commandid and by putting it into a treemap, we'll pull them off in commandid order. TreeMap treeMap = new TreeMap(); treeMap.putAll(requestMap); for (Iterator iter2 = treeMap.values().iterator(); iter2.hasNext();) { // for (Iterator iter2 = requestMap.values().iterator(); iter2.hasNext();) { Command command = (Command) iter2.next(); t.oneway(command); } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.