'gRPC how to set timeout between two messages in a stream
When I have a streaming RPC (be it client-side or server-side or bidirectional streaming), if I want to monitor if my stream is still active, by setting a timeout between two messages, how do I achieve that? (Java is preferred as gRPC APIs are quite different between languages) Thanks in advance!
Edit: Added explanation on "timeout between two messages".
What I imagine for "timeout between two messages" is like this. The client receives a stream of messages from the server, and the client does not know when the stream is expected to end (the server completes the stream). For example the server streams back S1,S2,S3,S4...S10 back to the client. If the server is somehow stuck before sending S5, the client will "time out" after receiving S4. Note that it's not the timeout for the whole stream to complete, but the timeout between message Si and S(i+1) (between every two messages in a stream.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
