Commanded and EventStore v1.0

Commanded v1.0.0 and EventStore v1.0.0 are now available from Hex.


  Elixir CQRS/ES Commanded


The v1.0 release has finally arrived. For both projects the significant change has been to allow you to define multiple event stores and Commanded apps. This follows the well known Elixir pattern, such as used by Ecto in Ecto.Repo, of defining one or more modules in your own application code. Which allows you to control the lifecycle, provide runtime config, and not be restricted to a single global instance.

With this feature you might choose to define a separate and isolated event store and Commanded app per context. This could be one event store per application within an umbrella project or multiple stores within a single Elixir application. Even if you don’t require multiple stores, you can still take advantage of controlling its lifecycle such as in your test suite.

Please refer to the following CHANGELOGs for all of the enhancements and bug fixes, and follow the upgrade guides to migrate to the v1 releases.

EventStore

Example usage
# Define an event store module
defmodule MyApp.EventStore do
  use EventStore, otp_app: :my_app
end

Commanded

Example usage
# Define an application
defmodule MyApp.Application do
  use Commanded.Application,
    otp_app: :my_app,
    event_store: [
      adapter: Commanded.EventStore.Adapters.EventStore,
      event_store: MyApp.EventStore
    ],
    pubsub: :local,
    registry: :local

  router(MyApp.Router)
end

# Dispatch a command
:ok = MyApp.Application.dispatch(%DoSomething{..})

Need help with Commanded?

I can provide support, training, and consultancy for your company to become event-driven and succeed when building Elixir applications using CQRS and event sourcing.

Please get in touch if I can help you out.