Skip to content

EventHubSequenceToken

class

Namespace: Orleans.Streaming.EventHubs

Event Hub messages consist of a batch of application layer events, so EventHub tokens contain three pieces of information. EventHubOffset - this is a unique value per partition that is used to start reading from this message in the partition. SequenceNumber - EventHub sequence numbers are unique ordered message IDs for messages within a partition. The SequenceNumber is required for uniqueness and ordering of EventHub messages within a partition. event Index - Since each EventHub message may contain more than one application layer event, this value indicates which application layer event this token is for, within an EventHub message. It is required for uniqueness and ordering of application layer events within an EventHub message.
[Orleans.GenerateSerializer]
public class EventHubSequenceToken : EventSequenceToken, IEventHubPartitionLocation

Remarks

Event Hub token versions and subclasses which explicitly select the Event Hubs compatibility domain compare using the Event Hubs sequence number and event index. During recovery, Orleans interprets exact EventSequenceToken positions from the earlier inherited event-token factory in this provider's sequence-number space. Delivered event tokens preserve their concrete type and Event Hubs offset.

Constructors

Properties

  • EventHubOffset Offset of the message within an EventHub partition
  • SequenceTokenCompatibilityDomain Gets the compatibility domain used to determine which event sequence tokens share this token's numeric equality and ordering contract.

Methods

  • CompareTo(StreamSequenceToken?)Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
  • Equals(StreamSequenceToken?)Indicates whether the current object is equal to another object of the same type.
  • GetHashCodeServes as the default hash function.
  • ToStringReturns a string that represents the current object.