You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2020/02/14 07:21:09 UTC
[activemq] branch master updated: AMQ-7404 add debug logging for
selectors loaded from the cache file
This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq.git
The following commit(s) were added to refs/heads/master by this push:
new e6befbc AMQ-7404 add debug logging for selectors loaded from the cache file
new 1c3a716 Merge pull request #451 from jgallimore/AMQ-7404
e6befbc is described below
commit e6befbc8750127d3f1a0a36eec91507b57aef2ab
Author: Jonathan Gallimore <jo...@jrg.me.uk>
AuthorDate: Wed Feb 12 11:15:59 2020 +0000
AMQ-7404 add debug logging for selectors loaded from the cache file
---
.../apache/activemq/plugin/SubQueueSelectorCacheBroker.java | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/activemq-broker/src/main/java/org/apache/activemq/plugin/SubQueueSelectorCacheBroker.java b/activemq-broker/src/main/java/org/apache/activemq/plugin/SubQueueSelectorCacheBroker.java
index bc55eac..ecea02f 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/plugin/SubQueueSelectorCacheBroker.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/plugin/SubQueueSelectorCacheBroker.java
@@ -194,7 +194,20 @@ public class SubQueueSelectorCacheBroker extends BrokerFilter implements Runnabl
try (FileInputStream fis = new FileInputStream(persistFile);) {
ObjectInputStream in = new ObjectInputStream(fis);
try {
+ LOG.debug("Reading selector cache....");
subSelectorCache = (ConcurrentHashMap<String, Set<String>>) in.readObject();
+
+ if (LOG.isDebugEnabled()) {
+ final StringBuilder sb = new StringBuilder();
+ sb.append("Selector cache data loaded from: ").append(persistFile.getAbsolutePath()).append("\n");
+ sb.append("The following entries were loaded from the cache file: \n");
+
+ subSelectorCache.forEach((k,v) -> {
+ sb.append("\t").append(k).append(": ").append(v).append("\n");
+ });
+
+ LOG.debug(sb.toString());
+ }
} catch (ClassNotFoundException ex) {
LOG.error("Invalid selector cache data found. Please remove file.", ex);
} finally {