Extreme event store adapter for Commanded
Use Greg Young’s Event Store with Commanded using the Extreme Elixir TCP client.
MIT License
Getting started
The package can be installed from hex as follows.
Add
commanded_extreme_adapterto your list of dependencies inmix.exs:def deps do [{:commanded_extreme_adapter, "~> 0.3"}] endConfigure Commanded to use the event store adapter:
config :commanded, event_store_adapter: Commanded.EventStore.Adapters.ExtremeConfigure the
extremelibrary connection with your Event Store connection details:config :extreme, :event_store, db_type: :node, host: "localhost", port: 1113, username: "admin", password: "changeit", reconnect_delay: 2_000, max_attempts: :infinityConfigure the
commanded_extreme_adapterto specify a stream prefix to be used by all Commanded event streams:config :commanded_extreme_adapter, stream_prefix: "commandeddev"Note Stream prefix must not contain a dash character (“-“).
You must run the Event Store with all projections enabled and standard projections started. Use the --run-projections=all --start-standard-projections=true flags when running the Event Store executable.
Testing
The test suite uses Docker to run the official Event Store container.
You will need to install Docker. For Mac uses, you may also need to install socat to expose the Docker API via a TCP port from its default Unix socket.
socat TCP-LISTEN:2375,reuseaddr,fork UNIX-CONNECT:/var/run/docker.sockGetting started
Pull the docker image:
docker pull eventstore/eventstoreRun the container using:
docker run --name eventstore-node -it -p 2113:2113 -p 1113:1113 eventstore/eventstoreNote: The admin UI and atom feeds will only work if you publish the node’s http port to a matching port on the host. (i.e. you need to run the container with -p 2113:2113).
Web UI
Get the docker ip address:
docker-machine ip defaultUsing the ip address and the external http port (defaults to 2113) you can use the browser to view the event store admin UI.
Username and password is admin and changeit respectively.