-
Notifications
You must be signed in to change notification settings - Fork 41.2k
GH-7646: Additional Kafka Properties #7672
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
Conversation
Resolves spring-projects#7646 Add `max.poll.records` and generic `properties.*`.
Since kafka properties are generally dotted, add a test to ensure dotted "catch-all" properties work.
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.
Minor concern in Docs.
Otherwise LGTM
Map<String, Object> producerProperties = properties.buildProducerProperties(); | ||
producerProperties.put("some.property", "some.value"); | ||
return new DefaultKafkaProducerFactory<Object, Object>(producerProperties); | ||
} |
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 think this sample should be still here, although re-phrased.
There are some cases which aren't covered with the current KafkaProperties
, (e.g. CommonClientConfigs.METRIC_REPORTER_CLASSES_CONFIG
), but I definitely may be interested in different values for consumer
and for producer
respectively.
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 we put this code in a file in https://github.com/spring-projects/spring-boot/tree/master/spring-boot-docs/src/main/java/org/springframework/boot and then include it in the docs please? This commit provides an example.
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.
Sweet - will do 😄
Add back custom config example, using include.
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.
👍
Add support for arbitrary Kafka properties via `spring.kafka.properties.*` and also a `spring.kafka.max.poll.records` property. See gh-7672
* pr/7672: Polish Kafka properties Support arbitrary Kafka properties
PR spring-projects#7672 Added support for arbitrary common properties. However, Kafka emits a warning if a producer configuration contains properties intended only for consumers, and vice versa. The documentation showed a sample of how to write code to configure arbitrary properties but this is inconvenient. Add arbitrary properties to the consumer and procucer configs.
PR #7672 Added support for arbitrary common properties. However, Kafka emits a warning if a producer configuration contains properties intended only for consumers, and vice versa. The documentation showed a sample of how to write code to configure arbitrary properties but this is inconvenient. Add arbitrary properties to the consumer and procucer configs. See gh-9775
Resolves #7646
Add
max.poll.records
and genericproperties.*
.