Java SDK support for Reactive framework

I am trying to create and execute workflows in Spring webflux(Project reactor)…
I have simple server that retrieves user data from postgres and data is available to application as Mono. When activity call completes, temporal tries to serialize data and in doing so it throws below exception
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of reactor.core.publisher.Mono (no Creators, like default constructor, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information

Looks like sdk is not able to deserialize Mono.

Please not that if we get User object from Mono by invoking block() method on Mono, workflow succeeds. But doing this will defeat the purpose of using reactive streams.

I tried to convert this application to regular Springboot web application and it works but fails to work for spring reactive.

Any solution to this problem? Does Java SDK has support for reactive programming?

Thanks,
Dhanraj

An activity invocation is essentially a remote procedure call with workflows and activities potentially residing on different machines. That’s why activity arguments and results should be serialized. Passing a stream to a remote process doesn’t make sense, so the error is expected.