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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot