From dc55028c00fcb8a4574b7c390d19f85220c1edfe Mon Sep 17 00:00:00 2001 From: Dmytro Chebotarskyi Date: Mon, 14 Nov 2022 15:58:30 -0800 Subject: [PATCH] Added additional logging on BrokerService startup --- .../main/java/org/apache/activemq/broker/BrokerService.java | 5 +++++ .../java/org/apache/activemq/store/kahadb/KahaDBStore.java | 2 +- .../org/apache/activemq/store/kahadb/MessageDatabase.java | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java b/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java index fd329fc2f9..64858e9f82 100644 --- a/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java +++ b/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java @@ -668,10 +668,13 @@ public class BrokerService implements Service { persistenceAdapterToStart.setBrokerName(getBrokerName()); LOG.info("Using Persistence Adapter: {}", persistenceAdapterToStart); if (deleteAllMessagesOnStartup) { + LOG.info("Deleting all messages on startup because deleteAllMessagesOnStartup configuration has been provided"); deleteAllMessages(); } + LOG.info("Starting Persistence Adapter: {}", persistenceAdapterToStart); persistenceAdapterToStart.start(); + LOG.info("Starting Temp Data Store"); getTempDataStore(); if (tempDataStore != null) { try { @@ -685,6 +688,7 @@ public class BrokerService implements Service { } } + LOG.info("Starting Job Scheduler Store"); getJobSchedulerStore(); if (jobSchedulerStore != null) { try { @@ -696,6 +700,7 @@ public class BrokerService implements Service { throw exception; } } + LOG.info("Persistence Adapter successfully started"); } private void startBroker(boolean async) throws Exception { diff --git a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java index 261a04b5ea..06dd0966bb 100644 --- a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java +++ b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java @@ -207,8 +207,8 @@ public class KahaDBStore extends MessageDatabase implements PersistenceAdapter, public void doStart() throws Exception { //configure the metadata before start, right now //this is just the open wire version + LOG.info("Starting KahaDBStore"); configureMetadata(); - super.doStart(); if (brokerService != null) { diff --git a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java index 8a4e0ef393..55137db18b 100644 --- a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java +++ b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java @@ -457,6 +457,7 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe } public void open() throws IOException { + LOG.info("Opening MessageDatabase"); if( opened.compareAndSet(false, true) ) { getJournal().start(); try {