wwwision/dcb-eventstore-esdb

EventSourcing Database adapter for the Dynamic Consistency Boundary implementation

Fund package maintenance!
bwaidelich
Paypal

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Type:package

pkg:composer/wwwision/dcb-eventstore-esdb

1.0.0 2025-12-24 13:06 UTC

This package is auto-updated.

Last update: 2025-12-26 16:35:08 UTC


README

EventSourcing Database adapter for the Dynamic Consistency Boundary implementation.

Usage

Installation

Install via composer:

composer require wwwision/dcb-eventstore-esdb

Create instance

use Wwwision\DCBEventStoreESDB\ESDBEventStore;

$eventStore = ESDBEventStore::create(baseUri: 'localhost:3000', apiKey: 'secret');

Specify custom event source / type prefix

EventSourcing Database expects each event to have a source specified. Furthermore, event types have to be namespaced.

By default, the eventSource is set to "https://dcb.events" and the event type is prefixed with "events.dcb." to be compliant. Those values are removed when reading events via the ESDBEventStore client, so the values are not really important. However, they can be changed via the with() function:

// ...
$eventStore = $eventStore->with(
  eventSource: 'https://domain.tld',
  eventTypePrefix: 'tld.domain.'
);

See wwwision/dcb-eventstore for more details and usage examples

Contribution

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

License

See LICENSE