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
{{ message }}
Repository navigation
feat: PostgreSQL LISTEN/NOTIFY for near-instant async projection updates #4183
The async daemon polls PostgreSQL at configurable intervals (250ms fast, 1s slow) to detect new events via the high water mark. This creates a latency floor between when events are appended and when projections process them. For use cases where sub-second projection updates matter, this polling delay is unnecessary overhead.
Proposed solution
Use PostgreSQL's built-in LISTEN/NOTIFY mechanism to wake the async daemon immediately when new events are appended, instead of waiting for the next poll cycle.
The implementation spans two repositories:
1. JasperFx.Events — IDaemonWakeup extension point
Introduces an IDaemonWakeup interface that abstracts the delay between polling cycles in the HighWaterAgent. The default TaskDelayDaemonWakeup preserves existing behavior (Task.Delay). Custom implementations can use external signals to wake the agent immediately.
@thomas-px I'm deeply unenthusiastic about using LISTEN/NOTIFY. It's been years, but my experience from early testing is that it's extremely unreliable
Activity
jeremydmiller commentedon Mar 23, 2026
@thomas-px I'm deeply unenthusiastic about using LISTEN/NOTIFY. It's been years, but my experience from early testing is that it's extremely unreliable
jeremydmiller commentedon Apr 6, 2026
I'm moving this to a discussion for now
[#4183] PostgreSQL LISTEN/NOTIFY support for async daemon wakeup (#4465)