-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Improve] [Connector-V2] Kafka client user configured clientid is preferred #3783
Conversation
…ser side is preferred; otherwise, the default clientid is set.
@@ -68,7 +68,12 @@ private KafkaConsumer<byte[], byte[]> initConsumer(String bootstrapServer, Strin | |||
properties.forEach((key, value) -> props.setProperty(String.valueOf(key), String.valueOf(value))); | |||
props.setProperty(ConsumerConfig.GROUP_ID_CONFIG, consumerGroup); | |||
props.setProperty(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapServer); | |||
props.setProperty(ConsumerConfig.CLIENT_ID_CONFIG, CLIENT_ID_PREFIX + "-consumer-" + this.hashCode()); | |||
if(this.metadata.getProperties().get("client.id") == null){ |
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.
Please format the code. thanks
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.
Format code completed, thank you.
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.
LGTM
…ferred (apache#3783) * If the clientid is configured on the user side, the clientid on the user side is preferred; otherwise, the default clientid is set. * format code style Co-authored-by: zhaoliang01 <zhaoliang01@58.com>
…ferred (apache#3783) * If the clientid is configured on the user side, the clientid on the user side is preferred; otherwise, the default clientid is set. * format code style Co-authored-by: zhaoliang01 <zhaoliang01@58.com>
If the clientid is configured on the user side, the clientid on the user side is preferred; otherwise, the default clientid is set.
Purpose of this pull request
Check list
New License Guide