-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Labels
area/performanceImprovements to performance.Improvements to performance.
Description
We are currently using the non-blocking poll call to rdkafka and if there are no messages we sleep. This works but it means there is a potential delay.
Instead, we could do a non-blocking poll and if there are no results we can switch to using task executor preference to switch to a DispatchQueue
backed executor and call the blocking poll method. That way we get notified as soon as a new message is available.
Roughly speaking this could look something like this
if let message = try client.consumerPoll() { // non-blocking call
return message
}
await withTaskExecutorPreference(someQueue) {
try client.consumerBlockingPoll()
}
Metadata
Metadata
Assignees
Labels
area/performanceImprovements to performance.Improvements to performance.