feat(outbox): relay committed outbox events to Kafka
This commit is contained in:
1 parent
78f1651f6b
commit
6c3b34f73e
42 files changed
+3731
-45
No files matched your search
@@ -543,7 +543,17 @@ func accountPayload(account testAccount) []byte {
|
||||
|
||||
func newAccountEvent(t *testing.T, account testAccount) domain.DomainEvent {
|
||||
t.Helper()
|
||||
event, err := domain.NewDomainEvent(domain.DomainEventInput{
|
||||
event, err := newAccountEventE(account)
|
||||
if err != nil {
|
||||
t.Fatalf("NewDomainEvent() error = %v", err)
|
||||
}
|
||||
return event
|
||||
}
|
||||
|
||||
// newAccountEventE is newAccountEvent for goroutines, which must not call
|
||||
// t.Fatal.
|
||||
func newAccountEventE(account testAccount) (domain.DomainEvent, error) {
|
||||
return domain.NewDomainEvent(domain.DomainEventInput{
|
||||
EventType: testAccountEventType,
|
||||
SchemaVersion: testEventSchema,
|
||||
AggregateType: testAggregateType,
|
||||
@@ -551,10 +561,6 @@ func newAccountEvent(t *testing.T, account testAccount) domain.DomainEvent {
|
||||
AggregateVersion: account.version,
|
||||
Payload: accountPayload(account),
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatalf("NewDomainEvent() error = %v", err)
|
||||
}
|
||||
return event
|
||||
}
|
||||
|
||||
func readOutboxEvents(ctx context.Context, t *testing.T, pool *pgxpool.Pool) []storedEvent {
|
||||
|
||||
Reference in new issue
Block a user