Skip to content

v0.3.0

Choose a tag to compare

@ryanio ryanio released this 17 Apr 19:21

Minor changes

  • Add version field to BaseStreamMessage for out-of-order event resolution (#70, OS2-31317)

Every stream event now includes a numeric version field that is monotonically increasing per source entity. Use it to handle out-of-order event delivery: when two events arrive for the same entity, the one with the higher version is newer state.

Version scale depends on event type

Event types version semantic
item_listed, item_cancelled, item_received_offer, item_received_bid, collection_offer, trait_offer, order_invalidate, order_revalidate Order revision counter (small monotonic integer per order)
item_transferred, item_sold, item_metadata_updated Epoch milliseconds of the event's source timestamp

Both representations are monotonic and sufficient for resolving out-of-order delivery, but the two scales are not comparable to each other. Compare version only for the same entity within the same event family. See the Event Versioning section of the README for usage examples.

Notes

  • This is an additive change: BaseStreamMessage<Payload> gains a required version: number field.
  • No code changes required for existing consumers — events previously continued to work without the field at runtime; upgrading picks up the new typed field for those who want to use it.