Skip to content
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

minor update on sarama config #461

Merged
merged 4 commits into from
Feb 18, 2019
Merged

minor update on sarama config #461

merged 4 commits into from
Feb 18, 2019

Conversation

WangXiangUSTC
Copy link
Contributor

@WangXiangUSTC WangXiangUSTC commented Jan 29, 2019

What problem does this PR solve?

minor update on sarama config to avoid some useless and confused log.

2019/01/29 11:48:57 config.go:361: [sarama] Producer.MaxMessageBytes must be smaller than MaxRequestSize; it will be ignored.
2019/01/29 11:48:57 config.go:382: [sarama] ClientID is the default of 'sarama', you should consider setting it to something application-specific.

issue: https://internal.pingcap.net/jira/browse/TOOL-891

What is changed and how it works?

  1. add client id
  2. update MaxRequestSize

Check List

Tests

  • Integration test
  • Manual test (check log)

Related changes

  • Need to cherry-pick to the release branch

@WangXiangUSTC
Copy link
Contributor Author

/run-all-tests

@july2993
Copy link
Contributor

LGTM

@july2993
Copy link
Contributor

@GregoryIan PTAL

kafkaCfg := sarama.NewConfig()
kafkaCfg.Consumer.Return.Errors = true
version, err := sarama.ParseKafkaVersion(kafkaVersion)
kafkaCfg, err := NewSaramaConfig(kafkaVersion, "drainer.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can CreateKafkaProducer also call this rather than sarama.NewConfig()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CreateKafkaProducer is useless now, I removed this function in latest commit.

@IANTHEREAL
Copy link
Collaborator

ping @WangXiangUSTC

Copy link
Member

@csuzhangxc csuzhangxc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@WangXiangUSTC WangXiangUSTC merged commit a8cee08 into master Feb 18, 2019
@WangXiangUSTC WangXiangUSTC deleted the xiang/kafka_log branch February 18, 2019 07:14
WangXiangUSTC added a commit that referenced this pull request Feb 26, 2019
july2993 pushed a commit that referenced this pull request Feb 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants