Skip to content

EventHubSequenceToken Methods

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.

CompareTo(StreamSequenceToken?)

override
View source
public override int CompareTo(StreamSequenceToken? other)
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.

Parameters

otherStreamSequenceToken?
An object to compare with this instance.

Returns

A value that indicates the relative order of the objects being compared. The return value has these meanings:
Value Meaning
Less than zero This instance precedes other in the sort order.
Zero This instance occurs in the same position in the sort order as other.
Greater than zero This instance follows other in the sort order.

Equals(StreamSequenceToken?)

override
View source
public override bool Equals(StreamSequenceToken? other)
Indicates whether the current object is equal to another object of the same type.

Parameters

otherStreamSequenceToken?
An object to compare with this object.

Returns

true if the current object is equal to the other parameter; otherwise, false.

GetHashCode

override
View source
public override int GetHashCode()
Serves as the default hash function.

Returns

A hash code for the current object.

ToString

override
View source
public override string ToString()
Returns a string that represents the current object.

Returns

A string that represents the current object.