activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Davies (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (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()
Date Wed, 09 Apr 2008 15:27:32 GMT

     [ https://issues.apache.org/activemq/browse/AMQ-1488?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rob Davies resolved AMQ-1488.
-----------------------------

    Fix Version/s: 5.1.0
       Resolution: Fixed

Fixed by svn revision 646401 

> 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
>            Assignee: Rob Davies
>             Fix For: 5.1.0
>
>
> 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.


Mime
View raw message