Releases: primait/event_sourcing.rs
Releases · primait/event_sourcing.rs
0.17.1
0.17.0
0.16.0
Note: this version contains hard breaking changes in the AggregateManager
API - refer to [#192] and [#194].
Added
- [[#194]]: New
LockedLoad
type to correctly manage locked loads inAggregateManager
.
Changed
- [[#192]]:
AggregateManager::handle_command
now returns a concreteResult<Result<(), Aggregate::Error>, Store::Error>
and is no longer generic in error. - [[#194]]:
AggregateManager::lock_and_load
now returns aLockedLoad
.
Fixed
- [[#194]]: Previously, concurrent
lock_and_load
s would drop the lock if the aggregate was empty, leading to concurrent writes (caught by optimistic locking). This is now correctly handled via theLockedLoad
result.
Commits
0.15.0
Added
- #191: Add new generic on
PgStore
andSchema
trait to decouple persistence fromAggregate::Event
. - #187: Make the
AggregateManager
deref
blanket implementation work for smart pointers.
Changed
- #191: Updated MSRV to
1.74.0
. - #191: Renamed
Event
trait toPersistable
(this should not affect users of the library since users of the library benefit from a blanket implementation).
Removed
- [[#191]]: Removed broken
sql
feature.
0.14.0
Added
- [[#185]]:
AggregateManager::handle_command
is generic in Error.
Fixed
- [[#185]]:
PgStore
is now alwaysClone
able.
Commits
- AggregateManager::handle command is generic in Error (#185) by Simone Cottini
- [PLATFORM-1416]: Fix event_sourcing.rs CI (#183) by Simone Cottini
- [PLATFORM-1364]: Migrate to GHA (#182) by Simone Cottini
- Update rdkafka requirement from 0.34.* to 0.36.* (#181) by dependabot[bot]
- Update typed-builder requirement from 0.16.0 to 0.18.0 (#179) by dependabot[bot]
- Fix deployment --allow-dirty issue (#177) by Simone Cottini
0.13.0
Added
- [[#147]]: Event upcasting, available under
upcasting
feature flag, disabled by default. - [[#164]]: Kafka messages are now published using the record key, set as the event
aggregate_id
. - [[#175]]: Connection manager for RabbitMQ event bus to handle connection outages and fail-overs.
Commits
- Prepare release 2023-09-12 (#176) by Simone Cottini
- [PLATFORM-1051]: Data conversion management (#147) by Simone Cottini
- [PLATFORM-1136]: Make sure ESRS message bus producers handle message bus outages and failover (#175) by Simone Cottini
- Update ouroboros requirement from 0.17 to 0.18 (#174) by dependabot[bot]
- Update rdkafka requirement from 0.33.* to 0.34.* (#173) by dependabot[bot]
- Update typed-builder requirement from 0.15.0 to 0.16.0 (#172) by dependabot[bot]
- [PLATFORM-1146]: Write step by step documentation (#171) by Simone Cottini
- Update sqlx requirement from 0.6.1 to 0.7.0 (#169) by dependabot[bot]
- Update typed-builder requirement from 0.14.0 to 0.15.0 (#170) by dependabot[bot]
- Update rdkafka requirement from 0.32.* to 0.33.* (#168) by dependabot[bot]
- Update ouroboros requirement from 0.15 to 0.17 (#166) by dependabot[bot]
- [PLATFORM-1137]: Kafka producer add record key (#164) by Simone Cottini
- Update rdkafka requirement from 0.29.* to 0.32.* (#163) by dependabot[bot]
0.12.0
Added
- [[#148]]:
ReplayableEventHandler
trait to mark anEventHandler
as replayable or not. This does not stick to
TransactionalEventHandlers
since it is taken for granted that they must always be replayable. - [[#149]]:
PgStoreBuilder
struct, currently the sole method for constructing aPgStore
. - [[#151]]: The
EventBus
trait is integrated with thePgStore
implementation to facilitate the publishing of events
after they have been processed by the handlers. - [[#152]]:
MigrationHandler
trait to run migrations while building a newPgStore
. - [[#155]]: Concrete implementations of the
EventBus
interface for Apache Kafka and RabbitMQ. These implementations
are available under therabbit
andkafka
features. - [[#155]]: Docker compose file for local development and testing.
- [[#156]]: The
table_name
andadd_event_handler
functions toPgStore
. - [[#156]]: Generic
Rebuilder
trait and concretePgRebuilder
struct facilities to rebuild a single aggregate. These
implementations are available under therebuilder
feature. - [[#157]]: The
TransactionalEventHandler
now includes a new generic type argument that allow to specify the error
return type. - [[#157]]: The
EventStore
trait now takes theAggregate
as associated type and now includes a new associated type
that allow to specify the error return type. - [[#157]]: New
PgStoreError
type as error return type forPgStore
.
Changed
- [[#148]]:
Projector
andPolicy
no longer exists. Replaced withEventHandler
andTransactionalEventHandler
. - [[#150]]:
AggregateManager
is no longer a trait; it now lives as a struct. - [[#150]]: The
EventStore
,PgStore
,EventHandler
,TransactionalEventHandler
andReplayableEventHandler
types,
previously associated with theAggregateManager
trait, now have a simplified constraint that they are bound
to theAggregate
trait. - [[#153]]: The
save_event
function in thePgStore
is now accessible only within the crate scope. - [[#156]]: The examples have been refactored as external executables and are no longer part of the cargo workspace.
- [[#157]]: The
AggregateManager
type bound has been changed fromAggregate
to anEventStore
type. - [[#157]]:
- [[#157]]: The return type error of the inner functions in
AggregateManager
has been modified fromAggregate::Error
to a new type calledAggregateManagerError<E>
. This change introduces a clear differentiation between an
Aggregate
error and anEventStore
error. - [[#157]]: The functions in the
EventStore
, including those in thePgStore
, now utilize the new error associated type
as their return type. - [[#161]]: Moved some traits and structs in other packages
- The
esrs::AggregateManager
struct (previously a trait) moved intoesrs::manager
module. - The
esrs::postgres
module has been relocated and can now be found underesrs::store::postgres
. - The
esrs::EventStore
,esrs::EventStoreLockGuard
,esrs::StoreEvent
andesrs::UnlockOnDrop
objects moved toesrs::store
module.
- The
Removed
- [[#153]]:
PgStore
getters functionstransactional_event_handlers
,event_handlers
andevent_buses
. - [[#153]]:
PgStore
custompersist
function. - [[#157]]: The
Clone
,Send
, andSync
bounds on the associated types ofAggregate
have been eliminated. - [[#161]]: The
error
module has been removed and is no longer available.
Commits
- [PLATFORM-1127]: Update changelog 2023-06-08 (#160) by Simone Cottini
- Update examples documentation (#162) by Simone Cottini
- Imports refactor (#161) by Simone Cottini
- [PLATFORM-1080]: Error handling (#157) by Simone Cottini
- [PLATFORM-1094]: Update examples (#156) by Simone Cottini
- [PLATFORM-1085]: Add some event bus specific impl (#155) by Simone Cottini
- [PLATFORM-1079]: Update doc and examples (#154) by Simone Cottini
- Remove custom persistence logic (#153) by Simone Cottini
- [PLATFORM-1083]: Split statements (#152) by Simone Cottini
- [PLATFORM-1077]: EventBus implementation (#151) by Simone Cottini
- [PLATFORM-1076]: PgStoreBuilder (#149) by Cristiano Piemontese
- [PLATFORM-1075]: Change bound from AggregateManager to Aggregate (#150) by Simone Cottini
- [PLATFORM-1073]: Remove projectors and policies in favour of event handlers (#148) by Cristiano Piemontese
0.11.0
Changed
- [[#144]]
- projector
consistency
function has been renamed inpersistence
. - projector
Consistency
enum has been renamed inProjectorPersistence
. - projector
ProjectorPersistence
enum entries renamed inMandatory
andFallible
.
- projector
Commits
- v0.11.0 (#146) by Simone Cottini
- Remove useless bounds on store (#145) by Simone Cottini
- [PLATFORM-966]: Change
Consistency
name (#144) by Simone Cottini - [PLATFORM-942]: Examples on how to create, update and delete event (#138) by Simone Cottini
0.10.2
Changed
- [[#141]]: log error in case of event projection or policy application failure
Fixed
- [[#141]]: fixed tracing of event projection and policy application
Commits
- Prepare release (#142) by Cristiano Piemontese
- [PLATFORM-951]: Log when policy returns error (#141) by Simone Cottini
- Add shared services as CODEOWNERS (#139) by Simone Cottini