Class KafkaPropertiesUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcopyProperties(Properties from, Properties to) static voidsetClientIdPrefix(Properties properties, String kafkaClusterId) client.id is used for Kafka server side logging, see https://docs.confluent.io/platform/current/installation/configuration/consumer-configs.html#consumerconfigs_client.id
-
Method Details
-
copyProperties
-
setClientIdPrefix
client.id is used for Kafka server side logging, see https://docs.confluent.io/platform/current/installation/configuration/consumer-configs.html#consumerconfigs_client.idSet client id prefix to avoid mbean collision warning logs. There are multiple instances of the AdminClient/KafkaConsumer so each instance requires a different client id (i.e. also per cluster).
Flink internally configures the clientId, making this the only way to customize the Kafka client id parameter.
If this is not done, we will encounter warning logs of the form:
WARN org.apache.kafka.common.utils.AppInfoParser [] - Error registering AppInfo mbean javax.management.InstanceAlreadyExistsException: kafka.consumer:type=app-info,id=null-enumerator-consumer
WARN org.apache.kafka.common.utils.AppInfoParser [] - Error registering AppInfo mbean javax.management.InstanceAlreadyExistsException: kafka.admin.client:type=app-info,id=null-enumerator-admin-client
-