KafkaConfig
Path
com.roma.apic.livedata.config.v1.KafkaConfig
extends
java.util.Properties
Description
This class is used together with KafkaProducer or KafkaConsumer to configure a Kafka client.
Constructor Details
public KafkaConfig()
Constructs a KafkaConfig without parameters.
Method List
|
Returned Type |
Method and Description |
|---|---|
|
static KafkaConfig |
getConfig(String servers, String groupId) Obtain a configuration for accessing Kafka provided by MQS (with sasl_ssl disabled). For details, see MQS Developer Guide. |
|
static KafkaConfig |
getSaslConfig(String servers, String groupId, String username, String password) Obtain a configuration for accessing Kafka provided by MQS (with sasl_ssl enabled). For details, see MQS Developer Guide. |
Method Details
- public static KafkaConfig getConfig(String servers, String groupId)
Access Kafka provided by MQS (with sasl_ssl disabled). For details, see MQS Developer Guide.
Input Parameter
- servers indicates the bootstrap server information in kafkaConfig.
- groupId indicates the group ID in kafkaConfig.
Returns
KafkaConfig object.
- public static KafkaConfig getSaslConfig(String servers, String groupId, String username, String password)
Access Kafka provided by MQS (with sasl_ssl enabled). For details, see MQS Developer Guide.
Input Parameter
- servers indicates the bootstrap server information in kafkaConfig.
- groupId indicates the group ID in kafkaConfig.
- username indicates the username.
- password indicates the password.
Returns
KafkaConfig object.
Last Article: KafkaProducer
Next Article: MD5Encoder
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.