Conversation
82ec112 to
3a451e2
Compare
|
unit test failed: |
3a451e2 to
b14dd27
Compare
|
Default version should be 2.1.1 instead of 2.1.0? |
| stopOnKafkaFail = {{ .PublicationConfig.StopOnKafkaFail }} | ||
|
|
||
| # kafka broker version, default (and most recommended) is 2.1.0. Minimal supported version could be 0.8.2 (not well tested) | ||
| kafkaVersion = "{{ .PublicationConfig.KafkaVersion }}" |
There was a problem hiding this comment.
Description how this is used: please modify the default value into the version of Kafka you are using.
There was a problem hiding this comment.
Description how this is used:
please modify the default value into the version of Kafka you are using.
I think this is intuitive, in config template, we should show users valid values... i.e. for
# Whether we want publish block
publishBlock = {{ .PublicationConfig.PublishBlock }} publishBlock = {{ .PublicationConfig.PublishBlock }}
we don't say: "please modify the value into true if you want use publish block information."
There was a problem hiding this comment.
remove the quotation mark
There was a problem hiding this comment.
Description how this is used:
please modify the default value into the version of Kafka you are using.I think this is intuitive, in config template, we should show users valid values... i.e. for
# Whether we want publish block publishBlock = {{ .PublicationConfig.PublishBlock }} publishBlock = {{ .PublicationConfig.PublishBlock }}we don't say: "please modify the value into true if you want use publish block information."
This config is quite different from publishBlock, since it it up to user to decide to choose use publishBlock or not, but we are highly recommend user to modify kafkaVersion if he use Kafka and just leave it as default, what is the meaning of this config? It will just show a wrong version. Better highlight this.
There was a problem hiding this comment.
This config is quite different from
publishBlock, since it it up to user to decide to choose usepublishBlockor not, but we are highly recommend user to modifykafkaVersionif he use Kafka and just leave it as default, what is the meaning of this config? It will just show a wrong version. Better highlight this.
Although I didn't agree, I will add this line as its no harm.
If publishBlock is a bad example. Configs like OrderUpdatesKafka and OrderUpdatesTopic are all configs have default value which 99% didn't match user's configuration. (I presume no one deployed kafka at localhost of their node, and auto.create.topic options is default to false on broker side). We don't say please modify the default value into the ip:port of Kafka you are using. and please modify the default value into the topic of your Kafka admin gave you.. User touch this publication section because they want to customize default configurations.
| } | ||
|
|
||
| func (publisher *KafkaMarketDataPublisher) newProducers() (config *sarama.Config, err error) { | ||
| version, err := sarama.ParseKafkaVersion(Cfg.KafkaVersion) |
There was a problem hiding this comment.
won't you check the support range? The is the only motivation that user modify app.toml
There was a problem hiding this comment.
the version should be within the sarama.SupportedVersions
There was a problem hiding this comment.
also, do we use any features that some old versions do not support even if they are in the sarama.SupportedVersions
There was a problem hiding this comment.
also, do we use any features that some old versions do not support even if they are in the sarama.SupportedVersions
no, we use basic publication functionalities. Message format are not compatible between versions, but if publisher/broker/consumer are same version, there should be no issue
There was a problem hiding this comment.
won't you check the support range? The is the only motivation that user modify
app.toml
I added an error if user specified an invalid version:
panic: kafka version in app.toml is not supported. Please choose a version within: [0.8.2.0 0.8.2.1 0.8.2.2 0.9.0.0 0.9.0.1 0.10.0.0 0.10.0.1 0.10.1.0 0.10.1.1 0.10.2.0 0.10.2.1 0.11.0.0 0.11.0.1 0.11.0.2 1.0.0 1.1.0 1.1.1 2.0.0 2.0.1 2.1.0]
sarama didn't officially support 2.1.1, if we set default version to 2.1.1, we cannot uni test it. |
b14dd27 to
ac0f6bd
Compare

Description
expose kafka version
Rationale
@huangsuyu reported a user request this
Example
N/A
Changes
trivial
Preflight checks
make build)make test)make integration_test)Already reviewed by
...
Related issues
#685