I believe that https://grpc.github.io/grpc-java/javadoc/io/grpc/ManagedChannel.html#getState-boolean- and https://grpc.github.io/grpc-java/javadoc/io/grpc/ManagedChannel.html#notifyWhenStateChanged-io.grpc.ConnectivityState-java.lang.Runnable- are the APIs that you are looking for.
Thanks, Eric On Tue, Jan 19, 2021 at 10:43 PM Sivarama Prasad < sivaramaprasad1...@gmail.com> wrote: > Please help in resolving the issue that I am facing. > > On Tuesday, January 19, 2021 at 12:21:28 PM UTC+5:30 Sivarama Prasad wrote: > >> Greetings, >> >> I am working on GRPC java assignment. >> >> Short desc abt requirement: >> >> multiple client applications and single server. >> >> Every time client stores the message in Database and upon successful >> storage, pass on the message to grpc server and store the message in server >> database. >> >> So, Client database and server database has the same set of database >> records. >> >> Problem stmt: >> When there is a network disconnect, client is unable to connect the >> server and hence there is a mismatch in database records(client vs Server) >> >> I am looking for a grpc-java flag/status to know disconnect and connect >> events so that I can pic the disconnect timestamp and push all the messages >> to server to be in sync the database records. >> >> Please provide me code snippet , sample/example to achive this. >> >> Thanks in advance. >> Sivaram >> > -- > 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/2324a65e-10f0-4a51-a942-5a92c80be524n%40googlegroups.com > <https://groups.google.com/d/msgid/grpc-io/2324a65e-10f0-4a51-a942-5a92c80be524n%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/CALUXJ7isyWx5t8bzjYFzi5_hnWn_tFL_%2BtmMm12J1A%2BhOLYLMA%40mail.gmail.com.