mattrpav commented on code in PR #2019:
URL: https://github.com/apache/activemq/pull/2019#discussion_r3350997352
##########
activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/MessageEvictionStrategy.java:
##########
@@ -42,4 +42,18 @@ public interface MessageEvictionStrategy {
*/
int getEvictExpiredMessagesHighWatermark();
+ /**
+ * Returns whether the eager expired-message scan is enabled.
+ * <p>
+ * When {@code false}, the O(n) scan inside
+ * {@link org.apache.activemq.broker.region.TopicSubscription#add} is
skipped entirely.
+ * Set to {@code false} when messages carry no TTL, or when the scan cost
outweighs
+ * the benefit of eagerly evicting expired messages from slow-consumer
buffers.
+ * <p>
+ * See {@link MessageEvictionStrategySupport} for the default
implementation that returns {@code true}.
+ *
+ * @return {@code true} if the expiry scan is enabled (default), {@code
false} if skipped
+ */
+ boolean isExpiryScanEnabled();
Review Comment:
Last minor nit to align the terminology with other areas of the code base:
Change to:
```
isExpiryCheckEnabled()
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact