Skip to content
Permalink
Browse files
AMQCLI-3 - improve logging
  • Loading branch information
cshannon committed Mar 13, 2017
1 parent 4d14839 commit 825cb468ef00846e1bb0bc83e24880b92c4b59f6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
@@ -23,6 +23,7 @@
import java.util.function.Predicate;
import java.util.stream.Collectors;

import org.apache.activemq.artemis.utils.SizeFormatterUtil;
import org.apache.activemq.command.ActiveMQDestination;
import org.apache.activemq.command.ActiveMQQueue;
import org.apache.activemq.command.ActiveMQTopic;
@@ -91,15 +92,20 @@ private void exportDestinations(ActiveMQDestination destPattern) throws IOExcept

// loop through all queues and export them
for (final ActiveMQDestination destination : destinations) {

LOG.info("Starting export of: " + destination);
final MessageStore messageStore = destination.isQueue() ?
adapter.createQueueMessageStore((ActiveMQQueue) destination) :
adapter.createTopicMessageStore((ActiveMQTopic) destination);

try {
messageStore.start();

LOG.info("Starting export of: {}; message count: {} message(s); message size: {}", destination,
messageStore.getMessageCount(), SizeFormatterUtil.sizeof(
messageStore.getMessageSize()));

// migrate the data
messageStore.recover(recoveryListener);
messageStore.stop();
} catch (Exception e) {
IOExceptionSupport.create(e);
}
@@ -25,7 +25,6 @@
import org.apache.activemq.cli.schema.QueueBindingType;
import org.apache.activemq.command.ActiveMQTopic;
import org.apache.activemq.command.SubscriptionInfo;
import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter;
import org.apache.activemq.store.kahadb.KahaDBStore;

public class ArtemisXmlMetadataExporter implements MessageStoreMetadataExporter {

0 comments on commit 825cb46

Please sign in to comment.