I check the document, it only says how auto commit works with poll()
here, and how to configure poll count, here.
So how things works when I use Flux
?
Below are my consumer code.
@Bean
fun consumerInboundMsg(handler: QueueHandler): java.util.function.Function<Flux<MessageRequest>, Mono<Void>> {
return Function { flux ->
flux.asFlow().flatMapMerge {
flow {
handler.handleInboundRequest(it)
emit(it)
}
}.asFlux().then()
}
}