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


##########
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:
   Would it be suitable to check the class instanceof/isassingable/isinstance 
vs having the type flag? Anyone extending KahaDB would still have this 
functionality.



-- 
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