protected GroupTopicConsumer(EventHubMessageBus messageBus, ITopicGroupConsumerSettings consumerSettings, Func <PartitionConsumer> processorFactory) { MessageBus = messageBus; _processorFactory = processorFactory; Log.InfoFormat("Creating EventProcessorHost for EventHub with Topic: {0}, Group: {1}", consumerSettings.Topic, consumerSettings.Group); _processorHost = MessageBus.EventHubSettings.EventProcessorHostFactory(consumerSettings); var eventProcessorOptions = MessageBus.EventHubSettings.EventProcessorOptionsFactory(consumerSettings); _processorHost.RegisterEventProcessorFactoryAsync(this, eventProcessorOptions).Wait(); }
protected GroupTopicConsumer(EventHubMessageBus messageBus, TopicGroup topicGroup, Func <PartitionConsumer> partitionConsumerFactory) { if (topicGroup is null) { throw new ArgumentNullException(nameof(topicGroup)); } MessageBus = messageBus ?? throw new ArgumentNullException(nameof(messageBus)); _logger = messageBus.LoggerFactory.CreateLogger <GroupTopicConsumer>(); _partitionConsumerFactory = partitionConsumerFactory ?? throw new ArgumentNullException(nameof(partitionConsumerFactory)); _logger.LogInformation("Creating EventProcessorHost for EventHub with Topic: {0}, Group: {1}", topicGroup.Topic, topicGroup.Group); _processorHost = MessageBus.ProviderSettings.EventProcessorHostFactory(topicGroup); var eventProcessorOptions = MessageBus.ProviderSettings.EventProcessorOptionsFactory(topicGroup); _processorHost.RegisterEventProcessorFactoryAsync(this, eventProcessorOptions).Wait(); }
public EventHubConsumer(EventHubMessageBus messageBus, RequestResponseSettings requestResponseSettings) : this(messageBus, requestResponseSettings, x => new EventProcessorForResponses(x, requestResponseSettings)) { }
public EventHubConsumer(EventHubMessageBus messageBus, ConsumerSettings consumerSettings) : this(messageBus, consumerSettings, x => new EventProcessorForConsumers(x, consumerSettings)) { }
protected PartitionConsumer(EventHubMessageBus messageBus) { MessageBus = messageBus ?? throw new ArgumentNullException(nameof(messageBus)); _logger = messageBus.LoggerFactory.CreateLogger <PartitionConsumer>(); }
public GroupTopicConsumer(EventHubMessageBus messageBus, RequestResponseSettings requestResponseSettings) : this(messageBus, new TopicGroup(requestResponseSettings.Topic, requestResponseSettings.GetGroup()), () => new PartitionConsumerForResponses(messageBus, requestResponseSettings)) { }
public GroupTopicConsumer(EventHubMessageBus messageBus, ConsumerSettings consumerSettings) : this(messageBus, new TopicGroup(consumerSettings.Topic, consumerSettings.GetGroup()), () => new PartitionConsumerForConsumers(messageBus, consumerSettings)) { }
public PartitionConsumerForConsumers(EventHubMessageBus messageBus, ConsumerSettings consumerSettings) : base(messageBus) { _instancePool = new ConsumerInstancePool <EventData>(consumerSettings, messageBus, e => e.Body.Array); _queueWorker = new MessageQueueWorker <EventData>(_instancePool, new CheckpointTrigger(consumerSettings)); }
protected PartitionConsumer(EventHubMessageBus messageBus) { MessageBus = messageBus; }
public PartitionConsumerForResponses(EventHubMessageBus messageBus, RequestResponseSettings requestResponseSettings) : base(messageBus) { _requestResponseSettings = requestResponseSettings; _checkpointTrigger = new CheckpointTrigger(requestResponseSettings); }