You can run multiple Server instances from the same application to get dynamic management like that, as long as you use a different port for the debug services and the critical services.
prodServer = Grpc.newServerBuilderForPort(50051, InsecureServerCredentials.create()) .addService(new GreeterImpl()) .build() .start(); .... Server startDebugServer() { dubugServer = Grpc.newServerBuilderForPort(50052, InsecureServerCredentials.create()) .addService(AdminInterface.getStandardServices()) .build() .start(); return debugServer; } void shutdownDebugServer(Server debugServer) { debugServer.shutdownNow(); debugServer.awaitTermination(); } Hope that helps, Larry On Tue, Jun 18, 2024 at 10:56 PM Darshan J <darshan010go...@gmail.com> wrote: > Hi guys, > I want to add and remove services to the grpc server without bringing down > other services running. > > Usecase: Whenever I need to use grpcurl > <https://github.com/fullstorydev/grpcurl> or grpcdebug > <https://github.com/grpc-ecosystem/grpcdebug> for debugging purposes, > these tools require like ProtoReflectionService, > AdminInterface.getStandardServices and so on. If my server is already > running with my critical services. How to add other services and also after > adding new services will I be able to remove it without bringing down the > critical services. > > Due to some contraints I do not wish to add it along with critical > services during first-time server bring up only in specific ocassions like > during debugging I would like to add it and remove when purpose is over. > > Thanks and Regards, > Darshan J Gowda > > -- > 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 grpc-io+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/grpc-io/3e107efd-e7a1-4c53-8099-cea888846a44n%40googlegroups.com > <https://groups.google.com/d/msgid/grpc-io/3e107efd-e7a1-4c53-8099-cea888846a44n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 grpc-io+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/CANuT3qWKxyLFugcCu7JVNm0SQqV-1DnzGY--B_FENB%2BoECdcHw%40mail.gmail.com.