Home > OS >  Can Spring Kafka @KafkaListener with @SendTo (read and reply) work with deferred results?
Can Spring Kafka @KafkaListener with @SendTo (read and reply) work with deferred results?

Time:07-05

I need something like this

    @SendTo
    @KafkaListener(topics = "some")
    public Future<String> getBatchInfo(String batchCode){
...}

Can spring kafka request-reply mechanism work with deferred results? I tried Future<>, CompletableFuture<>, Mono<> and no one work.

CodePudding user response:

That's correct. There is no such a feature in Spring for Apache Kafka around that receive-n-reply pattern.

Feel free to raise a GH issue with much more details with the reason behind such a request.

  • Related