wwwision/subscription-engine-dcb-adapter

wwwision/dcb-eventstore adapter for wwwision/subscription-engine

Maintainers

👁 bwaidelich

Package info

github.com/bwaidelich/subscription-engine-dcb-adapter

Type:package

pkg:composer/wwwision/subscription-engine-dcb-adapter

Fund package maintenance!

bwaidelich

Paypal

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 2

Open Issues: 0

1.1.0 2026-05-26 14:15 UTC

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT ed0d2083779c0aafed1a1852542863436ab39893

  • Bastian Waidelich <b.waidelich.woop@wwwision.de>

This package is auto-updated.

Last update: 2026-06-26 14:32:19 UTC


README

wwwision/dcb-eventstore adapter for wwwision/subscription-engine

Usage

$eventStore = DoctrineEventStore::create($dbalConnection, eventTableName: 'events');

$subscriptionEngine = new SubscriptionEngine(
 eventStoreAdapter: new DcbEventStoreAdapter($eventStore),
 subscriptionStore: new DoctrineSubscriptionStore($dbalConnection, tableName: 'subscriptions'),
 subscribers: Subscribers::fromArray([
 Subscriber::create(
 id: 'some-projection',
 handler: fn (SequencedEvent $sequencedEvent) => print($sequencedEvent->event->type->value),
 reset: fn () => print('resetting projection for replay'),
 ),
 Subscriber::create(
 id: 'some-process',
 handler: fn (SequencedEvent $sequencedEvent) => print('invoking process...'),
 runMode: RunMode::FROM_NOW,
 setup: fn () => print('setting up process...'),
 ),
 ])
);

Contribution

Contributions in the form of issues or pull requests are highly appreciated

License

See LICENSE