Hi Team,
Is it possible to access the value entity RPCs from actions?
Hi Team,
Is it possible to access the value entity RPCs from actions?
Hi @thamizh07,
yes, it’s possible via forward
or asyncEffect
methods. Please follow the docs or samples for more details: Implementing Actions in Java :: Kalix Documentation
Thanks @aludwiko for your reply.
I have all my value entity related protos in separate jar and i’m using that jar as a dependency in my kalix service.
I’m able to register that value entity in my kalix service (Main class) and able to access the endpoints from GRPC UI.
But my requirement is to call those endpoints from Action in kalix service
I’m not able to access the value entity using “components().” from my Action.
Can you please suggest any way to access the value entity defined in separate jar.
I see, interesting problem, a temporal workaround would be to get the client manually (Java version):
var counterService = GrpcClients.get(actionContext().materializer().system()).getComponentGrpcClient(***Service.class);
We will discuss internally if we want to provide sth easier to use.
I’m also a bit curious about your use case. What is precisely in the jar? Just proto files? If you’ve managed to register kalix components, then the code generator responsible, among others, for the components()
method creation should be in use.
Hi @aludwiko
We have all the reusable components in this Jar and we are using it as a dependency in all the kalix services.
Our requirement is to add all the value entity related stuff in the jar and can be used in all the other kalix services.
We are trying to populate the data into the value entity from Action in kalix service