-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
default linger.ms 0 doesn't make sense typically #108
default linger.ms 0 doesn't make sense typically #108
Conversation
// production burst when processes start to fail. (e.g. due to downstream service down) | ||
// Since default producer's linger.ms is 0, this could harm Kafka cluster despite we | ||
// don't much care about retry task's delivery latency typically. So we set reasonable default here. | ||
producerConfig.setProperty(ProducerConfig.LINGER_MS_CONFIG, "100"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you pull this up to somewhere like https://github.com/line/decaton/blob/master/client/src/main/java/com/linecorp/decaton/client/internal/DecatonTaskProducer.java#L42 for ability to easy spot where such defaults are defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about that, but I think making such high linger as the default is only acceptable for retry producers.
But yeah, defining in-line could make spotting the default difficult.
Let me find better way to define defaults for retry producer.
@@ -46,6 +48,17 @@ | |||
@Setter | |||
@Accessors(fluent = true) | |||
public class SubscriptionBuilder { | |||
private static final Map<String, String> presetProducerConfig; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
preset*Retry*ProducerConfig
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Motivation
linger.ms = 0
unless we explicitly set, since it's kafka-clients's default.Breaking Change
Producer
for sending retry tasks are now configured withlinger.ms=100
by default, so will introduce some latency in production unless the property is overwritten by the user.