Typical Scenario Description
Scenario
Kafka is a distributed message system, in which messages can be publicized or subscribed. A Producer is to be developed to send a message to a topic of a Kafka cluster every second, and a Consumer is to be implemented to ensure that the topic is subscribed and that messages of the topic are consumed in real time.
Development Idea
- Use a Linux client to create a topic.see Shell.
- Develop a Producer to produce data to the topic.
- Develop a Consumer to consume the data of the topic.
Suggestions on Performance Tuning
- Create a topic and plan its partitions based on service requirements. The number of partitions limits the number of concurrent consumers.
- The key value of a message must be variable to ensure even message distribution.
- Consumers are advised to proactively submit the offset to avoid repeated consumption.
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