You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there is no timeout for StreamMessage's aggregate() or subscribe(). If we want to give a timeout for HttpRequest.aggregate(), a separate scheduler needs to be run to abort the request if it is not completed within the given time.
The timeout API can also be used to detect an idle stream by setting a timeout until the next message. #5713 (comment)
enumStreamTimeoutMode {
UNTIL_FIRST,
// Maybe the default oneUNTIL_NEXT,
UNTIL_EOS// or UNTIL_LAST
}
StreamMessage<Object> stream = ...;
// Sets a timeout for each message to 5 seconds.stream.timeout(5_seconds).subscribe(....);
// UNTIL_EOS will be useful for unary requests.HttpRequestreq = ...;
req.timeout(StreamTimeoutMode.UNTIL_EOS, 10_seconds).aggregate();
req.aggregate(10_seconds); // Shortcut// UNTIL_NEXT will be useful for stream requests such as gRPC streams or WebSocket.WebSocketinput = ...;
input.timeout(UNTIL_NEXT, 3_seconds).subscribe(...);
The text was updated successfully, but these errors were encountered:
Currently, there is no timeout for
StreamMessage
'saggregate()
orsubscribe()
. If we want to give a timeout forHttpRequest.aggregate()
, a separate scheduler needs to be run to abort the request if it is not completed within the given time.The timeout API can also be used to detect an idle stream by setting a timeout until the next message. #5713 (comment)
The text was updated successfully, but these errors were encountered: