예제 #1
0
        private static void ProcessCreateEventHubConsumerGroupOptions(CreateEventHubConsumerGroupOptions options)
        {
            var eventHubConfig = new EventHubConnectionDetails(options.EventHubNamespace, options.EventHubName, options.EventHubSasPolicy, options.EventHubSasKey);
            var configurator   = new EventHubConfigurator(eventHubConfig);

            if (options.NumberOfInstances == 1)
            {
                configurator.AddConsumerGroup(options.ConsumerGroupName);
            }
            else
            {
                for (var i = 0; i < options.NumberOfInstances; i++)
                {
                    configurator.AddConsumerGroup(options.ConsumerGroupName + i);
                }
            }
        }
예제 #2
0
        private static void ProcessCreateEventHubConsumerGroupOptions(CreateEventHubConsumerGroupOptions options)
        {
            var eventHubConfig = new EventHubConnectionDetails(options.EventHubNamespace, options.EventHubName, options.EventHubSasPolicy, options.EventHubSasKey);
            var configurator = new EventHubConfigurator(eventHubConfig);

            if (options.NumberOfInstances == 1)
                configurator.AddConsumerGroup(options.ConsumerGroupName);
            else
            {
                for (var i = 0; i < options.NumberOfInstances; i++)
                {
                    configurator.AddConsumerGroup(options.ConsumerGroupName+i);
                }
            }
        }