-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplification of consumer internals #903
Comments
That sounds good - the only thing I wonder is how we would handle prioritising client requests over polls? I wonder if instead of switching to |
I'm thinking something like #906 - does that fit with what you had in mind? |
I agree with @LMnet that current code is not contributor-friendly. That's my experience at least 😅 I find it difficult to follow and I'm pretty confident that we can simplify it by removing completely I'm working on a POC to simplify the internals (let's see how far I can get). About how to prioritize client requests over polls: wouldn't Priority Queue be the answer to this? |
From here:
At the current moment, consumer internals are pretty complex: we have a
KafkaConsumer
itself, a hand-madedKafkaConsumerActor
, a queue for messages. Also, there is some complexity with different commit methods. And most of this complexity is to make all calls to a java consumer linearized. But actually, to achieve this we could use a simpleSemaphore(1)
. Under the hood, this semaphore uses a queue (like an actor), but all low-level queue-related machinery is hidden. With this, we could dramatically reduce the complexity of library internals and make it more contributor-friendly.The text was updated successfully, but these errors were encountered: