EventHubDataAdapter
class
Namespace: Orleans.Streaming.EventHubs
Default event hub data adapter. Users may subclass to override event data to stream mapping.
public class EventHubDataAdapter : ICacheDataAdapter, IEventHubDataAdapter, IQueueDataAdapter<EventData>Constructors
EventHubDataAdapter(Serializer)Cache data adapter that adapts EventHub's EventData to CachedEventHubMessage used in cache
Methods
EncodeMessageIntoSegment(EventData, Func<int, ArraySegment<byte>>)Encodes an Event Hub message into a cache segment.FromQueueMessage(StreamPosition, EventData, DateTime, Func<int, ArraySegment<byte>>)Converts an Event Hub message into a cached message.GetBatchContainer(EventHubMessage)Convert an EventHubMessage to a batch containerGetBatchContainer(CachedMessage)Converts a cached message to a batch container for deliveryGetOffset(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 theIStreamIdentityfor an event message.GetStreamPosition(string, EventData)Gets the stream position represented by an Event Hub message.ToQueueMessage(StreamId, IEnumerable<T>, StreamSequenceToken?, Dictionary<string, object>)Creates a cloud queue message from stream event data.
