You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/10/22 12:15:38 UTC
[GitHub] [pulsar] eolivelli commented on a diff in pull request #18156: Retry producing on next partition if possible when a partit…
eolivelli commented on code in PR #18156:
URL: https://github.com/apache/pulsar/pull/18156#discussion_r1002455689
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/RoundRobinPartitionMessageRouterImpl.java:
##########
@@ -50,24 +51,29 @@ public class RoundRobinPartitionMessageRouterImpl extends MessageRouterBase {
private static final Clock SYSTEM_CLOCK = Clock.systemUTC();
+ private Supplier<Boolean> batchingCallback;
+
public RoundRobinPartitionMessageRouterImpl(HashingScheme hashingScheme,
int startPtnIdx,
boolean isBatchingEnabled,
- long partitionSwitchMs) {
- this(hashingScheme, startPtnIdx, isBatchingEnabled, partitionSwitchMs, SYSTEM_CLOCK);
+ long partitionSwitchMs,
+ Supplier batchingCallback) {
+ this(hashingScheme, startPtnIdx, isBatchingEnabled, partitionSwitchMs, SYSTEM_CLOCK, batchingCallback);
}
public RoundRobinPartitionMessageRouterImpl(HashingScheme hashingScheme,
int startPtnIdx,
boolean isBatchingEnabled,
long partitionSwitchMs,
- Clock clock) {
+ Clock clock,
+ Supplier batchingCallback) {
Review Comment:
Nit: use generic type
Also, do we have to remove the isBatchingEnabled field?
What about simply changing the type of isBatchingEnable to Supplier<Boolean>
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org