You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "pjfanning (via GitHub)" <gi...@apache.org> on 2026/04/28 08:07:11 UTC
[PR] Port akka-persistence-r2dbc PR #313: Dynamically enable/disable publish-events [pekko-persistence-r2dbc]
pjfanning opened a new pull request, #353:
URL: https://github.com/apache/pekko-persistence-r2dbc/pull/353
## Summary
This PR ports https://github.com/akka/akka-persistence-r2dbc/pull/313 to this repository.
Part of https://github.com/akka/akka-persistence-r2dbc/releases/tag/v1.1.0 which is now available under Apache License 2.0
It adds the ability to dynamically enable/disable event publishing based on measured throughput using an exponentially weighted moving average (EWMA).
## Changes
### New files
- `EWMA.scala` — internal implementation of exponentially weighted moving average, used to measure event publish throughput
- `EWMASpec.scala` — unit tests for the EWMA implementation
### Modified files
- **`reference.conf`** — added `publish-events-dynamic` config block with `throughput-threshold` and `throughput-collect-interval`; changed default `publish-events` from `off` to `on`
- **`R2dbcSettings.scala`** — added `PublishEventsDynamicSettings` class to read the new dynamic config
- **`PubSub.scala`** — added dynamic throughput-based enable/disable logic; publishes events only when EWMA of throughput is below the configured threshold
- **`EventsBySliceBacktrackingSpec.scala`** — explicitly disables `publish-events` to avoid test interference
- **`EventsBySliceSpec.scala`** — explicitly disables `publish-events` to avoid test interference
- **`EventsBySlicePubSubSpec.scala`** — adds `publish-events-dynamic` config and a new test that verifies dynamic enable/disable behavior
- **`Dependencies.scala`** — adds `pekko-stream-typed` as a test dependency (needed for `ActorFlow` in the new test)
- **`query.md`** / **`projection.md`** — updated documentation to reflect that publish-events is now enabled by default with auto-throttling
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Port akka-persistence-r2dbc PR #313: Dynamically enable/disable publish-events [pekko-persistence-r2dbc]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning merged PR #353:
URL: https://github.com/apache/pekko-persistence-r2dbc/pull/353
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org