cshannon commented on code in PR #1423:
URL: https://github.com/apache/activemq/pull/1423#discussion_r2075698860


##########
activemq-broker/src/main/java/org/apache/activemq/broker/region/Topic.java:
##########
@@ -826,14 +830,51 @@ protected void dispatch(final ConnectionContext context, 
Message message) throws
     }
 
     private final AtomicBoolean expiryTaskInProgress = new 
AtomicBoolean(false);
-    private final Runnable expireMessagesWork = new Runnable() {
-        @Override
-        public void run() {
-            List<Message> browsedMessages = new InsertionCountList<Message>();
-            doBrowse(browsedMessages, getMaxExpirePageSize());
+    private final Runnable expireMessagesWork = () -> {
+        try {
+            final TopicMessageStore store = Topic.this.topicStore;
+            if (store != null && store.getType() == StoreType.KAHADB) {

Review Comment:
   @mattrpav - I actually forgot that even ignoring the proxy stuff (Because 
you could check delegates) it's not possible to do an instance of or class 
check. The code lives in the activemq-broker module and that module has no 
dependency on the data stores like KahaDB. So the KahaDB specific interfaces 
are not even on the classpath at compilation time.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org
For additional commands, e-mail: gitbox-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact


Reply via email to