Class EventPosition
- Namespace
- Microsoft.ServiceBus.Messaging
- Assembly
- Microsoft.ServiceBus.dll
Defines a position of an EventData in the event hub partition. The position can be one of Offset, SequenceNumber or EnqueuedTimeUtc.
public class EventPosition
- Inheritance
-
EventPosition
- Inherited Members
Methods
FromEnd()
Returns the position for the end of a stream. Provide this position in receiver creation to start receiving from the next available event in the partition after the receiver is created.
public static EventPosition FromEnd()
Returns
- See Also
FromEnqueuedTime(DateTime)
Creates a position at the given enqueued time. Events after this time are returned.
public static EventPosition FromEnqueuedTime(DateTime enqueuedTimeUtc)
Parameters
enqueuedTimeUtc
DateTime
Returns
- EventPosition
An EventPosition object.
FromOffset(string, bool)
Creates a position at the given offset.
public static EventPosition FromOffset(string offset, bool inclusive = false)
Parameters
offset
stringinclusive
boolIf true, the event at given offset is included; otherwise the next event is returned.
Returns
- EventPosition
An EventPosition object.
FromSequenceNumber(long, bool)
Creates a position at the given sequence number.
public static EventPosition FromSequenceNumber(long sequenceNumber, bool inclusive = false)
Parameters
sequenceNumber
longinclusive
boolIf true, the event at given sequence number is included; otherwise the next event is returned.
Returns
- EventPosition
An EventPosition object.
FromStart()
Returns the position for the start of a stream. Provide this position in receiver creation to starting receiving from the first available event in the partition.
public static EventPosition FromStart()
Returns
- See Also