AMQP and Kafka modules extensively use the following structure: Mono.fromCompletionStage(delegate.methodReturningCompletionStage()). However, this does not postpone execution until the there is an actual subscription to mono.
For example with a still in process Kafka client the following would end up in a successful assignment:
AMQP and Kafka modules extensively use the following structure:
Mono.fromCompletionStage(delegate.methodReturningCompletionStage())
. However, this does not postpone execution until the there is an actual subscription to mono.For example with a still in process Kafka client the following would end up in a successful assignment:
We should replace those constructs with the following:
Mono.fromCompletionStage(() -> delegate.methodReturningCompletionStage())