Simplify KafkaConsumer constructor logic#8707
Closed
nresare wants to merge 1 commit into
Closed
Conversation
This mirrors how the KafkaProducer constructors are organised and reduce code duplication.
Member
|
It seems #8605 is duplicate to this issue. |
Contributor
Author
|
@chia7712 what an interesting coincidence that our changes looks almost identical although I can assure you that they have been developed completely independently |
3 tasks
Member
|
Closing in favor of #8605. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This mirrors how the KafkaProducer constructors are organised and reduce
code duplication.
More specifically this PR makes the following changes without changing any behaviour or public API:
propsToMap()fromKafkaProducertoUtilswith the othersimilar helpers
mkMap()andmkProperties(), as this is now both used byKafkaConsumerandKafkaProducer.ConsumerConfiginstantiation to the constructor that actually does the work.addDeserializerToConfig()that operates onPropertiesand it's two tests, as all of those are very similar to the ones that operate onMap<String, Object>instances.KafkaConsumerconstructors that acceptPropertiesparameter convert those early toMap<String, Object>instances.Committer Checklist (excluded from commit message)