Are there any mongo reactive driver examples within activity. We have a reactive spring boot application which uses reactive mongo driver. Trying to see if there are any limitations on using the reactive mongo streams.
In case of Spring REST API usually the caller will block to trigger the reactive chain. Would like to understand how can this be handled within temporal activity classes.
I’m not familiar with the requirements these streams impose. Is ability to complete activity asynchronously without tying a thread to its execution enough?
To handle the back pressure scenarios(to handle better concurrency) we use reactive mongo and reactive rest client in our application. The mongo return Mono and rest return Mono. In order to read the response the client need to subscribe to the Mono. Trying to understand how does this work in temporal if activity returns Mono
And from it, it sounds like that it is about asynchronous programming. For example, you can use subscribe to complete activity asynchronously:
Publisher<Whatever> result = foo();
result.subscribe(.... /* complete activity here */);
For backpressure, we are going to implement this issue.
Am I missing something?
If reactor type interfaces are common we could create much tighter integration that would allow passing Mono and Flux objects between workflows and activities directly.