Hey everyone,

I have two Java services A and B. A provides RPC services via gRPC and
contains a proto file with service and message definitions. Now in B,
I want to call services from A.

Currently, I am not distributing the proto file but compile the proto
file into Java classes and create a JAR file in the service A build.
The JAR file gets publishes to my internal artifact repository but
without grpc-stub and grpc-protobuf transitive dependencies
(compileOnly). The calling service includes gRPC and the jar file with
the compile classes and then creates a ManagedChannel and a stub for
the xxxGrpc service.

It works for now, but is this a good idea? Would it be possible to
update gRPC in the calling service or might this break APIs and I have
to recompile the JAR file in the providing service?

Another way I could think of is to put the proto file into a JAR file
and add the JAR file to dependencies in all calling services. Then I'd
have to compile protobuf classes in each calling service but the gRPC
versions in both services are fully independent.

Whats the recommended way of doing this?

Mario

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CACHcfZpJM%2BioWMON-8M1Fees6gkorssr2O-hw4NbKwncbKUehQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to