Search code examples
spring-annotationsreactor

Spring annotation for Reactor.receive


I am working on Spring Reactor to write REST Services. I was wondering if there is an annotation to Reactor.receive method like we have @Selector and @ReplyTo

Such that :

in.consume(req -> reactor.sendAndReceive("test.httprequests", Event.wrap(req.getUri()), (Event<String>ev) -> { 

invokes the annotated method.


Solution

  • You should be able to just return a value from the method you annotate with @Selector to handle test.httprequests events. The wiring bean should treat that method the same as a receive, which is actually just an alias for being aware of the replyTo.