Skip to content

Generic SideEffectStorage#15

Merged
jdon merged 8 commits into
encryptionfrom
side-effects
Sep 23, 2025
Merged

Generic SideEffectStorage#15
jdon merged 8 commits into
encryptionfrom
side-effects

Conversation

@mapokko
Copy link
Copy Markdown
Collaborator

@mapokko mapokko commented Jul 31, 2025

Summary

Allows the implementing of the SideEffectStorage trait from a generic concrete type. The changes ensure that side effect storage.

Key Changes

  1. Made Side Effect Trait Generic (commit ef45f72)
  • Updated SideEffectStorage trait to be generic over the side effect type T
  • Added generic type parameter T to PostgresRepository and PostgresTransaction
  • Modified trait bounds to properly constrain side effect types with SideEffect<SideEffectId = Uuid> +
    Pickle + Send + Sync
  • Updated all repository and transaction method signatures to use the generic aggregate type
  1. Completed Generic Implementation (commit c8f50bd)
  • Fixed outbox implementation to work with the new generic constraints
  • Updated TransactionOutboxExt to work with T::SideEffect instead of raw side effect types
  • Modified RepositoryOutboxExt trait to properly handle aggregate-specific side effects
  • Updated all test helpers and examples to specify the aggregate type parameter
  • Added proper trait bounds ensuring aggregate types implement required traits
  1. Code Formatting (commit 7009ced)
  • Fixed formatting issue in transaction.rs where clause

Comment thread eventastic_outbox_postgres/src/outbox.rs Outdated
Comment thread eventastic_postgres/src/transaction.rs Outdated
Comment thread eventastic_postgres/src/repository.rs Outdated
aewakefield and others added 2 commits August 1, 2025 16:47
Co-Authored-By: Alex Wakefield <1181370+aewakefield@users.noreply.github.com>
Co-Authored-By: Fabio Mirza <79943909+mapokko@users.noreply.github.com>
@jdon jdon mentioned this pull request Aug 5, 2025
aewakefield and others added 3 commits September 11, 2025 15:07
When we get this error logged we end up with lots of different
messages due to the aggregate ID and version number. These should be
logged outside of the message to make grouping this easier.
chore: simplify the error message
@jdon jdon merged commit 0bc5b55 into encryption Sep 23, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants