You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An executor configuration option was added in #955 for @KafkaClient beans that enables specifying an ExecutorService to use to make methods that return reactive and CompletableFuture return types fully non-blocking. To avoid breaking existing applications that may already be compensating for the existing behavior with use of facilities such as @ExecuteOn in their calling code, the executor configuration is left empty by default.
We should consider setting this configuration to TaskExecutors.BLOCKING by default in a future major release so that users may take advantage of the reactive style without having to worry about the underlying blocking that happens in calls to the KafkaProducer API. TaskExecutors.BLOCKING is a good fit for this use case since it defaults to virtual threads on Java 21+.
The text was updated successfully, but these errors were encountered:
Depending on the timing of the 5.0.0 release vs the release of Kafka 3.8.0, this may not be necessary. Work is in progress in Kafka to refactor the threading model used by KafkaConsumer.
Feature description
An
executor
configuration option was added in #955 for@KafkaClient
beans that enables specifying anExecutorService
to use to make methods that return reactive and CompletableFuture return types fully non-blocking. To avoid breaking existing applications that may already be compensating for the existing behavior with use of facilities such as@ExecuteOn
in their calling code, theexecutor
configuration is left empty by default.We should consider setting this configuration to
TaskExecutors.BLOCKING
by default in a future major release so that users may take advantage of the reactive style without having to worry about the underlying blocking that happens in calls to theKafkaProducer
API.TaskExecutors.BLOCKING
is a good fit for this use case since it defaults to virtual threads on Java 21+.The text was updated successfully, but these errors were encountered: