baomingyu commented on a change in pull request #10168:
URL: https://github.com/apache/pulsar/pull/10168#discussion_r611436118
##########
File path:
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
##########
@@ -238,6 +238,9 @@
+ " affecting the accuracy of the delivery time compared to the
scheduled time. Default is 1 second.")
private long delayedDeliveryTickTimeMillis = 1000;
+ @FieldContext(category = CATEGORY_SERVER, doc = "HashedWheelTimer duration
tick time for when retrying on delayed delivery")
+ private long delayedDeliveryTickDurationMillis = 1000;
Review comment:
HashedWheelTimer use delayedDeliveryTickTimeMillis for initial , and
InMemoryDelayedDeliveryTracker use delayedDeliveryTickTimeMillis value to check
do or not for delay message in current tick period. when
delayedDeliveryTickTimeMillis is 1000ms, delay message will be consumer serval
millisecond ahead.
> if (deliveryAt < (now + tickTimeMillis)) {
// It's already about time to deliver this message. We add the
buffer of
// `tickTimeMillis` because messages can be extracted from the
tracker
// slightly before the expiration time. We don't want the
messages to
// go back into the delay tracker (for a brief amount of time)
when we're
// trying to dispatch to the consumer.
return false;
}
And Introduce 2 configurations to control the tick time of the delayed
message and config delayedDeliveryTickTimeMillis with 0 ,will avoid delay
message consumed millisecond ahead.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]