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
Using request.exceptionHandler(...), bidirectional streams can respond to ungraceful stream closure, which could be killing an app, a browser crashing, a phone running out of battery, network disconnection or other failure.
This package does not correctly receive exceptions the way Netty does. It lacks the configuration that the Netty server has for keep alives. This appears to be the root issue.
Steps to reproduce
Generate a bidi streaming method stub using the original Netty-based Vertx package's jprotoc based code generator. You will have a method of the signature:
After a short while, observe a StatusRuntimeException with status Status.CANCELLED is delivered to request.exceptionHandler.
Bind the same service to a GrpcServer.
Proxy it with ToxiProxy.
Connect to the bidi RPC endpoint.
Observe you are connected.
Disconnect the network using ToxiProxy.
Observe no exception is received nor the endHandler called in a short while.
Extra
This is reproduced in the tests of my own open source program. I can share that one. Otherwise I will need help authoring tests in this package, since Maven in my IntelliJ does not appear to generate the protos / reference them correctly and it's impossible to code. Additionally I suggest adding TestContainers as a dependency for using ToxiProxy.
The text was updated successfully, but these errors were encountered:
doctorpangloss
changed the title
The gRPC server bidirectional streams do not receive exceptions when the client loses connectivity, root issue is config options
The gRPC server bidirectional streams do not receive exceptions when the client loses connectivity
Jun 26, 2023
Version
4.3.7
Context
Using
request.exceptionHandler(...)
, bidirectional streams can respond to ungraceful stream closure, which could be killing an app, a browser crashing, a phone running out of battery, network disconnection or other failure.This package does not correctly receive exceptions the way Netty does. It lacks the configuration that the Netty server has for keep alives. This appears to be the root issue.
Steps to reproduce
jprotoc
based code generator. You will have a method of the signature:VertxServer
. Configure it with timeouts:StatusRuntimeException
with statusStatus.CANCELLED
is delivered torequest.exceptionHandler
.GrpcServer
.endHandler
called in a short while.Extra
This is reproduced in the tests of my own open source program. I can share that one. Otherwise I will need help authoring tests in this package, since Maven in my IntelliJ does not appear to generate the protos / reference them correctly and it's impossible to code. Additionally I suggest adding TestContainers as a dependency for using ToxiProxy.
The text was updated successfully, but these errors were encountered: