Make the boundary a business fact
How to design asynchronous event boundaries and versioned contracts so legacy applications and foundation-model consumers can evolve independently without losing business changes. · advanced
A useful asynchronous boundary publishes a committed business fact, not a request to run a particular model. OrderChanged says what happened; SummarizeOrderWithModelX couples the producer to a consumer's implementation. The legacy transaction should complete without waiting for inference. Its success means the business change is durable, not that every subscriber has finished.
Define a versioned contract with a stable event ID, event type, schema version, business entity ID, per-entity revision, occurrence time and correlation ID. Specify field meaning, units, nullability and whether the payload is a snapshot or a delta. A schema version describes the contract; an entity revision identifies a business-state change. Neither replaces the event ID used to recognize redelivery.
Keep prompts, model choices and output formats behind the consumer's contract adapter. An optional field is compatible only when existing readers tolerate unknown fields and its absence has defined meaning. Renaming a required field or changing an amount from cents to dollars is breaking even if the payload remains valid JSON. Minimize sensitive data; a reference to mutable current state cannot reconstruct an earlier change unless a historical version is retained.
AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.