Table of Contents

Interface IVersionedMessage

Namespace
Excalibur.Dispatch
Assembly
Excalibur.Dispatch.Abstractions.dll

Marker interface for messages that support explicit versioning.

public interface IVersionedMessage
Extension Methods

Remarks

Any message type implementing this interface can be automatically upcasted through the IUpcastingPipeline when older versions are encountered. This includes domain events, commands, queries, and integration events.

Properties

MessageType

Gets the logical message type name (version-independent).

string MessageType { get; }

Property Value

string

Remarks

This should remain constant across versions. Examples:

  • "UserCreatedEvent" for UserCreatedEventV1, V2, V3
  • "CreateUserCommand" for CreateUserCommandV1, V2, V3
  • "GetUserQuery" for GetUserQueryV1, V2, V3

Version

Gets the schema version of this message.

int Version { get; }

Property Value

int

Remarks

Version numbers should start at 1 and increment sequentially. Breaking changes require a version increment.