kafkamdm: make kafka version configurable #446
Closed
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 PR will fix #444
This implementation will add kafkaVersion as option to the kafkamdm route. If no version got specified carbon-relay-ng will print a warning and use sarama.DefaultVersion.
This means that users can now specify the kafka version but if they don't do it carbon-relay-ng will act as in the current implementation.
ParseKafkaVersion will return the same default value on error as sarama.NewConfig() would:
https://github.com/Shopify/sarama/blob/v1.23.0/utils.go#L196
https://github.com/Shopify/sarama/blob/v1.23.0/config.go#L439
We might discuss if the message regarding invalid version should be a warn or info.