admin管理员组文章数量:1336632
Kafka API provides functionality for Kafka consumers where it it allows applications to read and process messages from Kafka topics and it is used in applications that need to consume messages. That the common approach we all know for consumers-api. But what is the primary difference between an AsyncKafkaConsumer
and ClassicKafkaConsumer
? Are these primarily used internally by Kafka and not exposed directly via the API?
Kafka API provides functionality for Kafka consumers where it it allows applications to read and process messages from Kafka topics and it is used in applications that need to consume messages. That the common approach we all know for consumers-api. But what is the primary difference between an AsyncKafkaConsumer
and ClassicKafkaConsumer
? Are these primarily used internally by Kafka and not exposed directly via the API?
1 Answer
Reset to default 0AsyncKafkaConsumer and ClassicKafkaConsumer aren't part of Kafka's core API. The Classic Consumer uses a blocking poll() to fetch messages synchronously, giving you full control over processing and offset commits. The Async Consumer fetches and processes messages non-blockingly, often using callbacks or reactive streams. While the Classic Consumer is part of the standard Kafka API, Async patterns are typically implemented by frameworks or libraries on top of Kafka
本文标签:
版权声明:本文标题:java - What is the main difference between AsyncKafkaConsumer and ClassicKafkaConsumer in Apache-Kafka - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742331729a2454829.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论