- Support composite command routers (#111).
- Aggregate state snapshots (#121).
- New
error/3
callback for process manager and deprecatederror/4
(#124) - Router support for identity prefix function.
- Retry command execution on concurrency error (#132).
- Event handler
error/3
callback (#133). - Support distributed dispatch consistency (#135).
- Defer event handler and process router init until after subscribed (#138).
- Replace aggregate lifespan
after_command/1
callback withafter_event/1
(#139). Support process manager routing to multiple instances (#141).
- The
Commanded.Aggregates.AggregateLifespan
behaviour has been changed fromafter_command/1
toafter_event/1
. You will need to update your own lifespan modules to use events instead of commands to shutdown an aggregate process after an inactivity timeout.
- Event handler
child_spec/1
must include config options defined by use macro.
- Process manager command dispatch error handling (#93).
- Event handlers may define an
init/0
callback function to start any related processes. It must return:ok
, otherwise the handler process will be stopped. - Add
include_execution_result
option to command dispatch (#96). - Add
Commanded.Aggregate.Multi
(#98) as a way to return multiple events from a command dispatch that require aggregate state to be updated after each event. - Correlation and causation ids (#105).
- Initial support for running on a cluster of nodes (#80).
- Adding a prefix to the aggregate in the router breaks the strong consistency of command dispatch (#101).
Please ensure you upgrade the following event store dependencies.
Using the Elixir EventStore:
Using Greg's Event Store:
commanded_extreme_adapter
to v0.4.0
- Dispatch command with
:eventual
or:strong
consistency guarantee (#82). - Additional stream prefix per aggregate (#77).
- Include custom metadata during command dispatch (#61).
- Validate command dispatch registration in router (59).
Please ensure you upgrade the following event store dependencies.
Using the Elixir EventStore:
Using Greg's Event Store:
commanded_extreme_adapter
to v0.3.0
- Command dispatch optionally returns aggregate version, using
include_aggregate_version: true
during dispatch.
Commanded.Event.Handler
andCommanded.ProcessManagers.ProcessManager
macros to simplify defining, and starting, event handlers and process managers. Note the previous approach to defining and starting may still be used, so this is not a breaking change.
- Shutdown idle aggregate processes (#43).
-
Extract event store integration to a behaviour (
Commanded.EventStore
). This defines the contract to be implemented by an event store adapter. It allows additional event store databases to be used with Commanded.By default, a
GenServer
in-memory event store adapter is used. This should only be used for testing as there is no persistence.The existing PostgreSQL-based eventstore integration has been extracted as a separate package (commanded_eventstore_adapter). There is also a new adapter for Greg Young's Event Store using the Extreme library (commanded_extreme_adapter).
You must install the required event store adapter package and update your environment configuration to specify the
:event_store_adapter
module. See the README for details.
- Stream events from event store when rebuilding aggregate state.
- Upgrade to Elixir 1.4 and remove compiler warnings.
- Event handler and process manager subscriptions should be created from a given stream position (#14).
- Stop process manager instance after reaching its final state (#24).
- Middleware
after_failure
callback is executed even when a middleware halts execution.
- JsonSerializer should ensure event type atom exists when deserializing (#28).
- Command handlers should be optional by default (#30).
- Simplify aggregates and process managers (#31).
- Restarting aggregate process should load all events from its stream in batches. The Event Store read stream default limit is 1,000 events.
- Command handling middleware allows a command router to define middleware modules that are executed before, and after success or failure of each command dispatch (#12).
- Process manager instance processes event non-blocking to prevent timeout during event processing and any command dispatching. It persists last seen event id to ensure events are handled only once.
- Command dispatch timeout. Allow a
timeout
value to be configured during command registration or dispatch. This overrides the default timeout of 5 seconds. The same as the defaultGenServer
call timeout.
- Fix pending aggregates restarts: supervisor restarts aggregate process but it cannot accept commands (#22).
- Upgrade
eventstore
mix dependency to v0.6.0 to use support for recorded events created_at asNaiveDateTime
.
- Confirm receipt of events in event handler and process manager router (#19).
- Convert keys to atoms when decoding JSON using Poison decoder.
- Prefix process manager instance snapshot uuid with process manager name.
- Multi command dispatch registration in router (#16).
- Include event metadata as second argument to event handlers. An event handler must now implement the
Commanded.Event.Handler
behaviour consisting of a singlehandle_event/2
function.
- Macro to assist with building process managers (README).
- Include unit test event assertion function:
assert_receive_event/2
(#13). - Include top level application in mix config.
- Don't persist an aggregate's pending events when executing a command returns an error (#10).
- Ensure an aggregate's pending events are persisted in the order they were applied.
- Support integer, atom or strings as an aggregate UUID (#7).