Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

World-Architects/event-sourcing-example

Repository files navigation

Event Sourcing Example App

Prerequisite

A basic understanding of event sourcing and domain modelling.

Goals

  • Demonstrate event sourcing
  • Demonstrate minimal / none dependencies on the domain for event sourcing
  • Demonstrate projections

Event Store Settings

All the code uses the Event Store default credentials:

  • username: admin
  • password: changeit
  • HTTP port: 2212
  • TCP/IP: 1113

You can change the configuration in config/config.php.

If you need further assistance with the event store please check the official documentation https://eventstore.org/docs/.

Shell Scripts

HTTP Client

Running AggregateTest.php will generate a new stream with two events and output the aggregate id and data if it was successful.

php .\AggregateTest.php'

You need to pass the stream, for the example app this is Account-<aggregate-uuid>.

If you use the --checkpoint option, you can reply events from a given position in the stream. If not it will start with the first event.

php .\CatchupSubscriptionTest.php --stream='<stream-name>'

Async Client

Basically the same as above just that these files implement the async client library.

php .\AsyncAggregateTest.php
php .\AsyncCatchupSubscription.php --stream='<stream-name>'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages