I'm using Flink StateFun 3.1.0, and want to call a remote Python function from an embedded Java function. In StateFun 2.2, I could create a ProtoBuf Any from an instance of my (generated via Protobuf) Java class via Any.pack(msg), and that worked. Now I get
Caused by: java.lang.ClassCastException: class com.google.protobuf.Any cannot be cast to class org.apache.flink.statefun.sdk.reqreply.generated.TypedValue (com.google.protobuf.Any and org.apache.flink.statefun.sdk.reqreply.generated.TypedValue are in unnamed module of loader 'app')
There are plenty of examples of calling between embedded Java functions, and remote Java functions, and remote Python functions, but I haven't found an example of calling remote Python from embedded Java.
In the remote Java examples, the function is called with a Context that has a send(Message) method, which I assume would work for calling a remote Python function as well, but my embedded Java function is passed a different type of Context that does not support this method.