-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Vmhtuan/kafka producer config #26130
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,6 +43,8 @@ public class KafkaEventListenerConfig | |
| private boolean publishCreatedEvent = true; | ||
| private boolean publishCompletedEvent = true; | ||
| private boolean publishSplitCompletedEvent; | ||
| private Long maxRequestSize = 5242880L; | ||
| private Long batchSize = 16384L; | ||
| private Optional<String> completedTopicName = Optional.empty(); | ||
| private Optional<String> createdTopicName = Optional.empty(); | ||
| private Optional<String> splitCompletedTopicName = Optional.empty(); | ||
|
|
@@ -115,6 +117,30 @@ public KafkaEventListenerConfig setCreatedTopicName(String createdTopicName) | |
| return this; | ||
| } | ||
|
|
||
| public Long getMaxRequestSize() | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. getters/setters place should be consistent with fields. |
||
| { | ||
| return maxRequestSize; | ||
| } | ||
|
|
||
| @Config("kafka-event-listener.max-request-size") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| public KafkaEventListenerConfig setMaxRequestSize(Long maxRequestSize) | ||
| { | ||
| Optional.ofNullable(maxRequestSize).ifPresent(value -> this.maxRequestSize = value); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this.maxRequestSize = maxRequestSize; |
||
| return this; | ||
| } | ||
|
|
||
| public Long getBatchSize() | ||
| { | ||
| return batchSize; | ||
| } | ||
|
|
||
| @Config("kafka-event-listener.batch-size") | ||
| public KafkaEventListenerConfig setBatchSize(Long batchSize) | ||
| { | ||
| Optional.ofNullable(batchSize).ifPresent(value -> this.batchSize = value); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this.batchSize = batchSize; |
||
| return this; | ||
| } | ||
|
|
||
| public Optional<String> getSplitCompletedTopicName() | ||
| { | ||
| return splitCompletedTopicName; | ||
|
|
||
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.
Could you leave a code comment explaining how these values are chosen?
Please use
longinstead.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.
Thank you for reviewing! This PR has some issues, and I have closed it. I have opened a new PR at #26132. And I'm gonna resolve your comments. Thanks!