EventHubAdapterFactory
class
Namespace: Orleans.Streaming.EventHubs
Queue adapter factory which allows the PersistentStreamProvider to use EventHub as its backend persistent event queue.
public class EventHubAdapterFactory : IQueueAdapter, IQueueAdapterCache, IQueueAdapterFactoryConstructors
EventHubAdapterFactory(string, EventHubOptions, EventHubReceiverOptions, EventHubStreamCachePressureOptions, StreamCacheEvictionOptions, StreamStatisticOptions, IEventHubDataAdapter, IServiceProvider, ILoggerFactory, IEnvironmentStatisticsProvider)Initializes a new instance of theEventHubAdapterFactoryclass.
Properties
CacheFactoryCreates a message cache for an eventhub partition.DirectionDirection of this queue adapter: Read, Write or ReadWrite.IsRewindableDetermines whether this is a rewindable stream adapter - supports subscribing from previous point in time.NameName of the adapter. Primarily for logging purposesQueueMapperFactoryCreate a queue mapper to map EventHub partitions to queuesReceiverMonitorFactoryCreate a receiver monitor to report performance metrics. Factory function should return an IEventHubReceiverMonitor.StreamFailureHandlerFactoryCreates a failure handler for a partition.
Methods
Create(IServiceProvider, string)Creates and initializes an Event Hubs adapter factory.CreateAdapterCreates the queue adapter and initializes its partition mapping.CreateCacheFactory(EventHubStreamCachePressureOptions)Create a IEventHubQueueCacheFactory. It will create a EventHubQueueCacheFactory by default. User can override this function to return their own implementation of IEventHubQueueCacheFactory, and other customization of IEventHubQueueCacheFactory if they may.CreateQueueCache(QueueId)Creates a cache for the specified queue.CreateReceiver(QueueId)Creates a queue receiver for the specified queue.GetDeliveryFailureHandler(QueueId)Gets the delivery failure handler for a queue.GetPartitionIdsAsyncGets the partition identifiers from Event Hubs.GetQueueAdapterCacheGets the queue cache factory implemented by this instance.GetStreamQueueMapperGets the mapper between Orleans stream queues and Event Hub partitions.InitInitializes the adapter factory and its Event Hub client, cache, queue mapping, and monitoring components.InitEventHubClientInitializes the Event Hub producer client.QueueMessageBatchAsync(StreamId, IEnumerable<T>, StreamSequenceToken?, Dictionary<string, object>)Writes a set of events to the queue as a single batch associated with the provided streamId.
Fields
EventHubReceiverFactoryFactory to create a IEventHubReceiverdataAdapterData adapterloggerOrleans loggingserviceProviderFramework service provider
