Viewing Sample Code of Kafka Production and Consumption
Distributed Message Service for Kafka allows you to view sample Java, Go, and Python code of producing and consuming messages on the console. You can quickly complete Kafka client integration.
Procedure
- Log in to the console.
- Click in the upper left corner to select a region.
Select the region where your Kafka instance is located.
- Click and choose Middleware > Distributed Message Service (for Kafka) to open the console of DMS for Kafka.
- Click the desired Kafka instance to view the instance details.
- In the navigation pane, choose Topics.
- Click View Sample Code. The Sample Code dialog box is displayed.
View sample code for creating and retrieving messages in Java, Go, and Python. Set Access By to PlainText to view the sample code where SASL_SSL authentication is disabled. Set Access By to SASL_SSL to view the sample code where SASL_SSL authentication is enabled.
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