Skip to content

Add event emitter, GIN index for tags and DCB with any append store - #342

Merged
DavidBadura merged 1 commit into
4.0.xfrom
subscription-events-and-dcb-improvements
Oct 5, 2026
Merged

DavidBadura merged 1 commit into
4.0.xfrom
subscription-events-and-dcb-improvements

Conversation

@DavidBadura

Copy link
Copy Markdown
Member

This wires up a few event-sourcing 4.0 features that the bundle didn't support yet.

The event emitter can be enabled with subscription.event_emitter. It registers the EventEmitterResolver and the RemoveSubscriptionStreamListener on the engine's event dispatcher. It's opt-in because removing a subscription also deletes its subscription_<id> stream from the event store, and it can't be combined with a read only store.

With a dbal_taggable store the PostgreSQLPlatformMiddleware is now registered on the event store connection, so the GIN index for the tags gets created on PostgreSQL. For a url connection this happens in the DbalConnectionFactory, for a doctrine connection like doctrine.dbal.eventstore_connection via the doctrine.middleware tag. Any other connection service needs the middleware registered manually, which is mentioned in the docs.

DCB now uses the configured store instead of the TaggableDoctrineDbalStore directly. Since the InMemoryStore implements AppendStore as well, it can now be used in tests, and custom append stores work too. Only dbal_stream is rejected.

The lock file is updated to the latest event-sourcing 4.0.x, which contains the GIN index.

The event emitter is opt-in via subscription.event_emitter, because removing
a subscription also removes its subscription stream from the event store.

With a taggable store the PostgreSQLPlatformMiddleware is registered on the
event store connection, so the GIN index for tags gets created.

DCB now uses the configured store, so the in memory store can be used in
tests as well.
@DavidBadura
DavidBadura merged commit 750b30a into 4.0.x Oct 5, 2026
22 of 23 checks passed
@DavidBadura
DavidBadura deleted the subscription-events-and-dcb-improvements branch October 5, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants