dlydiard/ddd-cqrs-es-aws-sam

projection-event-handler: cross-aggregate projections can encounter a race condition

dlydiard opened this issue · 0 comments

Race condition can happen where projection doesn't exist when dealing with event enrichment, since aggregates are managed within their own queues.

This scenario should be rare since the API consumer would have to issue updates without first doing reads.

Add https://github.com/mauricedb/polly-js to use wait/retry logic.

New logic needs to account for new record creation (skip fetching record)