Class ModelEventMetadata

java.lang.Object
io.fluxzero.common.api.modeling.ModelEventMetadata

public final class ModelEventMetadata extends Object
Reserved metadata keys identifying events emitted by an independent-model commit.
  • Field Details

    • COMMIT_ID

      public static final String COMMIT_ID
      Durable idempotency identity of the model commit that emitted an event.
      See Also:
    • SUBSTEP

      public static final String SUBSTEP
      Ordered substep within the model commit.
      See Also:
  • Method Details

    • readBoundary

      public static ModelReadBoundary readBoundary(Metadata metadata)
      Returns the commit boundary carried by metadata, or null when it is not a Model event.
    • readBoundary

      public static ModelReadBoundary readBoundary(Metadata metadata, MessageType messageType, Long messageIndex)
      Returns the Model boundary carried by a Model event, or falls back to an existing global event index.

      The fallback lets events that predate Model metadata address state reconstructed from that same published event. Without migration coordination, an event without a Model mapping retains ordinary current-state behavior. A repository configured with followPublishedEventMigration may instead wait for the mapping or reject a processed event that produced none. An event index is never interpreted as a Model state index.