Edit

Share via


EventHubDataAdapter Class

Definition

Default event hub data adapter. Users may subclass to override event data to stream mapping.

public class EventHubDataAdapter : Orleans.Providers.Streams.Common.ICacheDataAdapter, Orleans.Streaming.EventHubs.IEventHubDataAdapter, Orleans.Streams.IQueueDataAdapter<Azure.Messaging.EventHubs.EventData>
type EventHubDataAdapter = class
    interface IEventHubDataAdapter
    interface IQueueDataAdapter<EventData>
    interface ICacheDataAdapter
Public Class EventHubDataAdapter
Implements ICacheDataAdapter, IEventHubDataAdapter, IQueueDataAdapter(Of EventData)
Inheritance
EventHubDataAdapter
Implements

Constructors

EventHubDataAdapter(Serializer)

Cache data adapter that adapts EventHub's EventData to CachedEventHubMessage used in cache

Methods

EncodeMessageIntoSegment(EventData, Func<Int32,ArraySegment<Byte>>)
FromQueueMessage(StreamPosition, EventData, DateTime, Func<Int32,ArraySegment<Byte>>)
GetBatchContainer(CachedMessage)

Converts a cached message to a batch container for delivery

GetBatchContainer(EventHubMessage)

Convert an EventHubMessage to a batch container

GetOffset(CachedMessage)

Get offset from cached message. Left to derived class, as only it knows how to get this from the cached message.

GetPartitionKey(StreamId)

Get the Event Hub partition key to use for a stream.

GetSequenceToken(CachedMessage)

Gets the stream sequence token from a cached message.

GetStreamIdentity(EventData)

Get the IStreamIdentity for an event message.

GetStreamPosition(String, EventData)
ToQueueMessage<T>(StreamId, IEnumerable<T>, StreamSequenceToken, Dictionary<String,Object>)

Applies to