Open vladimir-lu opened 5 years ago
This could be solved ad-hoc on the call side with RestartSource
.
But it may be nicer to solve it in the connector itself, where it would retry if the response indicates that the request is retriable.
we also get the same issue with gRPC pubsub client using alpakka 2.0.2
io.grpc.StatusRuntimeException: INTERNAL: HTTP/2 error code: INTERNAL_ERROR Received Rst Stream at io.grpc.Status.asRuntimeException(Status.java:533) at akka.grpc.internal.AkkaNettyGrpcClientGraphStage$$anon$1.onCallClosed(AkkaNettyGrpcClientGraphStage.scala:165) at akka.grpc.internal.AkkaNettyGrpcClientGraphStage$$anon$1.$anonfun$callback$1(AkkaNettyGrpcClientGraphStage.scala:71) at akka.grpc.internal.AkkaNettyGrpcClientGraphStage$$anon$1.$anonfun$callback$1$adapted(AkkaNettyGrpcClientGraphStage.scala:67) at akka.stream.impl.fusing.GraphInterpreter.runAsyncInput(GraphInterpreter.scala:466) at akka.stream.impl.fusing.GraphInterpreterShell$AsyncInput.execute(ActorGraphInterpreter.scala:498) at akka.stream.impl.fusing.GraphInterpreterShell.processEvent(ActorGraphInterpreter.scala:600) at
Would be nice if suggested PR will be taken into main branch. Currently have to workaround the problem with RestartSource
Versions used
Alpakka version: 1.0-RC1 Akka version: 2.5.21
Expected Behavior
Subscribing with a PubSub GRPC client to a topic subscription using a streaming pull request should yield a constant stream of messages.
Notably the example code in https://doc.akka.io/docs/alpakka/current/google-cloud-pub-sub-grpc.html should work:
Actual Behavior
At some point after start-up, usually something like 30-60 minutes later, the client receives a server disconnect and prints:
UNAVAILABLE: The service was unable to fulfill your request. Please try again. [code=8a75]
This causes the stream to stop and the program to error.
However, this status is retryable - and indeed the java library does not even log the exception: https://github.com/googleapis/google-cloud-java/pull/2492 (also see https://stackoverflow.com/questions/46914087/google-pubsub-unavailable-the-service-was-unable-to-fulfill-your-request)
Relevant logs
Reproducible Test Case
Reproduction code included above - you need to run this against the live PubSub service for some time to reproduce.