Skip to content

Releases: primait/event_sourcing.rs

0.17.1

20 Aug 08:14
aa0c26c
Compare
Choose a tag to compare

Updated

  • updated sqlx to 0.8.0

Commits

  • Update sqlx requirement from 0.7.0 to 0.8.0 in the cargo group (#199) by dependabot[bot]
  • [SREH-705] Update zookeeper image to pull from new Prima mirror (#198) by Jason Linham

0.17.0

12 Jun 10:50
4d504cf
Compare
Choose a tag to compare

Changed

  • [[#196]]: AggregateManager::handle_command now returns the updated aggregate state, instead of ().

Commits

  • prepare release 0.17 (#197) by angelo-rendina-prima
  • AggregateManager handle command returns updated state (#196) by angelo-rendina-prima

0.16.0

08 May 09:56
ba6f98d
Compare
Choose a tag to compare

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 in AggregateManager.

Changed

  • [[#192]]: AggregateManager::handle_command now returns a concrete Result<Result<(), Aggregate::Error>, Store::Error> and is no longer generic in error.
  • [[#194]]: AggregateManager::lock_and_load now returns a LockedLoad.

Fixed

  • [[#194]]: Previously, concurrent lock_and_loads would drop the lock if the aggregate was empty, leading to concurrent writes (caught by optimistic locking). This is now correctly handled via the LockedLoad result.

Commits

  • Prepare release 0.16.0 (#195) by angelo-rendina-prima
  • double result on handle command (#192) by angelo-rendina-prima
  • LockedLoad (#194) by angelo-rendina-prima

0.15.0

03 Apr 15:01
8766a1c
Compare
Choose a tag to compare

Added

  • #191: Add new generic on PgStore and Schema trait to decouple persistence from Aggregate::Event.
  • #187: Make the AggregateManager deref blanket implementation work for smart pointers.

Changed

  • #191: Updated MSRV to 1.74.0.
  • #191: Renamed Event trait to Persistable (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

09 Jan 11:16
b79b681
Compare
Choose a tag to compare

Added

  • [[#185]]: AggregateManager::handle_command is generic in Error.

Fixed

  • [[#185]]: PgStore is now always Cloneable.

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

13 Sep 07:59
fea2540
Compare
Choose a tag to compare

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

09 Jun 14:38
967306e
Compare
Choose a tag to compare

Added

  • [[#148]]: ReplayableEventHandler trait to mark an EventHandler 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 a PgStore.
  • [[#151]]: The EventBus trait is integrated with the PgStore implementation to facilitate the publishing of events
    after they have been processed by the handlers.
  • [[#152]]: MigrationHandler trait to run migrations while building a new PgStore.
  • [[#155]]: Concrete implementations of the EventBus interface for Apache Kafka and RabbitMQ. These implementations
    are available under the rabbit and kafka features.
  • [[#155]]: Docker compose file for local development and testing.
  • [[#156]]: The table_name and add_event_handler functions to PgStore.
  • [[#156]]: Generic Rebuilder trait and concrete PgRebuilder struct facilities to rebuild a single aggregate. These
    implementations are available under the rebuilder 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 the Aggregate 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 for PgStore.

Changed

  • [[#148]]: Projector and Policy no longer exists. Replaced with EventHandler and TransactionalEventHandler.
  • [[#150]]: AggregateManager is no longer a trait; it now lives as a struct.
  • [[#150]]: The EventStore, PgStore, EventHandler, TransactionalEventHandler and ReplayableEventHandler types,
    previously associated with the AggregateManager trait, now have a simplified constraint that they are bound
    to the Aggregate trait.
  • [[#153]]: The save_event function in the PgStore 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 from Aggregate to an EventStore type.
  • [[#157]]:
  • [[#157]]: The return type error of the inner functions in AggregateManager has been modified from Aggregate::Error
    to a new type called AggregateManagerError<E>. This change introduces a clear differentiation between an
    Aggregate error and an EventStore error.
  • [[#157]]: The functions in the EventStore, including those in the PgStore, 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 into esrs::manager module.
    • The esrs::postgres module has been relocated and can now be found under esrs::store::postgres.
    • The esrs::EventStore, esrs::EventStoreLockGuard, esrs::StoreEvent and esrs::UnlockOnDrop objects moved to esrs::store module.

Removed

  • [[#153]]: PgStore getters functions transactional_event_handlers, event_handlers and event_buses.
  • [[#153]]: PgStore custom persist function.
  • [[#157]]: The Clone, Send, and Sync bounds on the associated types of Aggregate have been eliminated.
  • [[#161]]: The error module has been removed and is no longer available.

Commits

0.11.0

03 Apr 14:14
a993edf
Compare
Choose a tag to compare

Changed

  • [[#144]]
    • projector consistency function has been renamed in persistence.
    • projector Consistency enum has been renamed in ProjectorPersistence.
    • projector ProjectorPersistence enum entries renamed in Mandatory and Fallible.

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

16 Feb 10:27
440fe78
Compare
Choose a tag to compare

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

0.10.1

06 Feb 16:07
2028488
Compare
Choose a tag to compare

Fixed

[[#136]]: select_all query ordering was missing of sequence_number.


Commits

  • Update changelog (#137) by Simone Cottini
  • Order by occurred_on and sequence number in select_all statement (#136) by Simone Cottini