pjfanning opened a new pull request, #661:
URL: https://github.com/apache/pekko-projection/pull/661

   ### Motivation
   When the gRPC producer is unreachable, the `GrpcReadJournal` 
`eventsBySlices` stream fails with a `RuntimeException` wrapping the gRPC 
`UNAVAILABLE` error, including a full stack trace. The projection restarts and 
retries, so this common situation produces a lot of log noise.
   
   ### Modification
   Port of akka/akka-projection#980:
   - add internal `ConnectionException` (`NoStackTrace`)
   - in the `eventsBySlices` `recover`, map a `GrpcServiceException` with 
status `UNAVAILABLE` to `ConnectionException`. Other failures are still wrapped 
in the existing `RuntimeException`.
   
   ### Result
   A failed or lost connection surfaces as a short `Connection to host:port for 
stream id ... failed or lost` error without a stack trace. Failure and retry 
semantics are unchanged.
   
   ### Tests
   - `sbt "grpc-test/Test/testOnly 
org.apache.pekko.projection.grpc.consumer.scaladsl.GrpcReadJournalConnectionSpec"`:
 passes. It fails without the `GrpcReadJournal` change because the stream fails 
with `RuntimeException: Failure to consume gRPC event stream ...`, which is not 
a `ConnectionException`.
   - scalafmt on changed files, `sbt headerCreateAll` / `headerCheckAll` for 
`grpc` and `grpc-test`, whitespace diff check
   - MiMa not run: `MimaPlugin` is disabled for the `grpc` module (new in 2.0.0)
   
   ### References
   Refs akka/akka-projection#980 
(https://github.com/akka/akka-projection/pull/980) - source of the ported code 
(`ConnectionException.scala` and the `recover` case). Akka Projection v1.5.0 
passed its Apache 2.0 change date on 2026-10-25.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to