I've been working with project Reactor for a while but I'm fairly new to SI, specially when it comes to using reactive components in SI. This might be very basic but I can't still figure it out and the more I read the Spring docs the less I understand.
I have this flow where I'm using a reactive adapter that returns Mono<Void>.
And as I understand, once you're using a handler/gateway that returns either void or Mono<Void> (one-way 'MessageHandler') then that signals the end of the flow and you can't add anything else downstream.
So that leaves me with this:
@Bean
public IntegrationFlow flow(AdapterThatReturnsMonoVoid adapter) {
return f -> f
// transformations, routing and other stuff..
.handle(adapter::handleMessage)
}
Now. How will the subscription to that Mono be done? What if I want to subscribe with a channel to that Mono? Even if the Mono is not emitting any items I'd like to be able to subscribe to the completion signal.
If for example I use the MongoDb.reactiveOutboundChannelAdapter(...), when I run the flow, I can see that the payload is in fact being stored in mongo. So I assume the subscription is being done automatically?
I guess my intention would be to get some kind of receipt that the operation was done.
Thanks for the help!