From 2cef32be6c2c1457863bcd33a8653930987b6635 Mon Sep 17 00:00:00 2001 From: Clebert Suconic Date: Mon, 8 Jan 2018 18:43:24 -0500 Subject: [PATCH] ARTEMIS-1591 Preserve ordering on message exporter --- .../artemis/cli/commands/tools/xml/XmlDataExporter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XmlDataExporter.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XmlDataExporter.java index 6e9ef46af8..7a59c00ea7 100644 --- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XmlDataExporter.java +++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XmlDataExporter.java @@ -31,6 +31,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.TreeMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; @@ -100,7 +101,7 @@ public final class XmlDataExporter extends OptionalLocking { private final Map> messageRefs = new HashMap<>(); // map of all message records hashed by their record ID (which will match the record ID of the message refs) - private final HashMap messages = new HashMap<>(); + private final Map messages = new TreeMap<>(); private final Map> cursorRecords = new HashMap<>();