pjfanning opened a new pull request, #511:
URL: https://github.com/apache/pekko-persistence-r2dbc/pull/511

   ### Motivation
   Port of 
[akka/akka-persistence-r2dbc#440](https://github.com/akka/akka-persistence-r2dbc/pull/440)
 (`fix: Filter FilteredPayload in pub-sub`).
   
   The code is copied from the akka-persistence-r2dbc 1.2.0 release, which is 
available under the Apache License, Version 2.0 as of 2026-10-24 (its LICENSE 
change date).
   
   When `journal.publish-events` is enabled, a persisted `FilteredPayload` is 
published to `eventsBySlices` subscribers as an envelope whose event is the 
`FilteredPayload` object and whose `filtered` flag is `false`.
   
   ### Modification
   `PubSub.publish` maps a `FilteredPayload` to an envelope with no event and 
`filtered = true`.
   
   ### Result
   Pub-sub envelopes for filtered events are consistent with the database query 
envelopes (see #510 for the query side).
   
   ### Tests
   - `sbt "core/testOnly *EventsBySlicePubSubSpec"`: new test `turn 
FilteredPayload to filtered events with no payload` fails before the fix 
(`false was not equal to true`) and passes after it (PostgreSQL in docker). 
Adapted from upstream: it publishes for the Setup's persistence id, so the 
subscription-ready check is on the same slice as the published event.
   - `sbt core/test`: 358 succeeded, 0 failed
   - `sbt core/mimaReportBinaryIssues`: no issues
   - scalafmt, `git diff --check`
   
   ### References
   Refs akka/akka-persistence-r2dbc#440


-- 
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