KafkaConsumer API Performance Challenges and Optimization Suggestions ( Kafka clients 3.6.1) #145316
Unanswered
gmungi
asked this question in
Programming Help
Replies: 1 comment 1 reply
-
The performance difference you're experiencing is due to architectural changes in the Kafka client API from version 0.8.1 to 3.6.1. The newer KafkaConsumer introduces additional overhead, such as group coordination and metadata fetching, which can slow down the initial poll.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Body
Scenario:
We are migrating from an old Kafka client (version 0.8.1) to a newer Kafka client (version 3.6.1). The old Kafka implementation used the following approach, which was fast and efficient:
Old Code (Kafka Client 0.8.1):java
Observed Issue:
Slowness in First Poll: The first fetch of 500 records takes significantly longer (e.g., 1284 ms) compared to subsequent fetches (e.g., 4 ms).
Kafka Consumer Initialization: Operations like assign(), seek(), and fetching the earliest offset are taking time, and this impacts the performance.
Objective:
We need to reduce the time taken for the first poll (the first 500 records).
We are also looking for ways to efficiently perform assign(), seek(), and get the earliest offset in Kafka, without introducing unnecessary delays.
Please provide guidance on these areas to replicate the performance of the old Kafka implementation using the newer Kafka Consumer API.
Guidelines
Beta Was this translation helpful? Give feedback.
All reactions