All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Usage of Go workspaces for local development.
- New
core/message
package for defining messages. core/serde
package for serialization and deserialization of types.serdes
module usingcore/serde
with some common protocol implementations: Protobuf, ProtoJSON and JSON.postgres.AggregateRepository
implementation to load/save Aggregates directly, and still saving recorded Domain Events in a separate table (events
).oteleventually.InstrumentedRepository
provides anaggregate.Repository
instrumentation.- New
scenario.AggregateRoot
API to BDD-like test scenario on anaggregate.Root
instance.
aggregate
package uses Go generics foraggregate.Repository
andaggregate.Root
interfaces.eventually.Payload
is nowmessage.Message
.eventually.Message
is nowmessage.Envelope
.eventstore.Event
is nowevent.Persisted
.eventstore.Store
is nowevent.Store
.command.Command[T]
is now usingmessage.Message[T]
.command.Handler
is now generic over itscommand.Command
input.scenario
package is now undercore/test/scenario
.scenario.CommandHandler
now uses generics for command and command handler assertion.postgres
module now usespgx
andpgxpool
to handle connection with the PostgreSQL database, instead ofdatabase/sql
.postgres.EventStore
usesserde.Serializer
interface to serialize/deserialize Domain Events to[]byte
.oteleventually.InstrumentedEventStore
is now adapted to the newevent.Store
interface.
SequenceNumber
from theevent.Persisted
struct (was previouslyeventstore.Event
).eventstore.SequenceNumberGetter
, to follow the previousSequenceNumber
removal.command.Dispatcher
interface, as implementing it with generics is currently not possible.
- Add
logger.Logger
tocommand.ErrorRecorder
to report errors when appending Command failures to the Event Store. command.ErrorRecorder
must be passed by reference to implementcommand.Handler
interface now (size of the struct increased).
- Remove the
events
field fromoteleventually.InstrumentedEventStore
due to the potential size of the field and issues with exporting the trace (which wouldn't fit an UDP packet). - Remove the
event
field fromoteleventually.InstrumentedProjection
.
X-Eventually-TraceId
andX-Eventually-SpanId
metadata keys are recorded when usingoteleventually.InstrumentedEventStore.Append
.- Add
eventstore.ContextAware
andeventstore.ContextMetadata
to set some Metadata in the context to be applied to all Domain Events appended to the Event Store.
postgres.Serializer
andpostgres.Deserializer
usestream.ID
for the mapping function.- Update
go.opentelemetry.io/otel
tov1.2.0
- Update
go.opentelemetry.io/otel/metric
tov0.25.0
- Testcase for the Event Store testing suite to assert that
eventstore.Appender.Append
returnseventstore.ErrConflict
. postgres.EventStore.Append
returnseventstore.ErrConflict
in case of conflict now.
- Metric types in
oteleventually
have been adapted to the latestv0.24.0
version. eventstore.ErrConflict
has been renamed toeventstore.ConflictError
.
- An option to override Event appending logic in Postgres EventStore implementation.
postgres.Serde
interface to support more serialization formats.
- Existing
Event-Id
value in Event Metadata does not get overwritten in correlation.EventStoreWrapper. postgres.EventStore
now uses theSerde
interface for serializing to and deserializing from byte array.postgres.Registry
is now calledpostgres.JSONRegistry
and implements thenewpostgres.Serde
interface.CaptureErrors
incommand.ErrorRecorder
is now a function (ShouldCaptureError
), to allow for a more flexible capture strategy.
A lot of changes have happened here, a lot of different API design iterations and stuff. All of which, I diligently forgot to keep track of...
Sorry :)