(grpc-java) Detecting client network disconnect and connect

48 views
Skip to first unread message

Sivarama Prasad

unread,
Jan 19, 2021, 1:51:28 AM1/19/21
to grpc.io
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

Sivarama Prasad

unread,
Jan 20, 2021, 1:43:11 AM1/20/21
to grpc.io
Please help in resolving the issue that I am facing.

Eric Gribkoff

unread,
Jan 20, 2021, 7:25:12 AM1/20/21
to Sivarama Prasad, grpc.io

--
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+u...@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.

Sivarama Prasad

unread,
Feb 3, 2021, 2:28:19 AM2/3/21
to grpc.io
Hi Eric,
Thanks for taking time and providing the document links.

However can I get the code snippet for usage on notifyWhenStateChanged using java.

Thanks
Sivaram

Sanjay Pujare

unread,
Feb 3, 2021, 11:38:39 AM2/3/21
to Sivarama Prasad, grpc.io
Reply all
Reply to author
Forward
0 new messages