Allow a name to be provided when starting an event store. All event store operations can be provided with an optional name to determine the event store instance.
Example
Define an event store:
defmodule MyApp.EventStore do
use EventStore, otp_app: :eventstore
end
Start multiple instances of the event store, each with a unique name:
Allow a name to be provided when starting an event store. All event store operations can be provided with an optional name to determine the event store instance.
Example
Define an event store:
Start multiple instances of the event store, each with a unique name:
Use an event store by providing a name:
Dynamic schemas
This feature also allows you to start each event store instance using a different schema:
Or start supervised:
The above can be used for multi-tenancy where the data for each tenant is stored in a separate schema.