1 instantiation of ConsumerConnectionFactory
Aspire.Confluent.Kafka (1)
AspireKafkaConsumerExtensions.cs (1)
162=> new(CreateConsumerBuilder(serviceProvider, configureBuilder, settings), settings.Config);
8 references to ConsumerConnectionFactory
Aspire.Confluent.Kafka (8)
AspireKafkaConsumerExtensions.cs (8)
116builder.Services.AddSingleton<ConsumerConnectionFactory<TKey, TValue>>(sp => CreateConsumerConnectionFactory<TKey, TValue>(sp, configureBuilder, settings)); 117builder.Services.AddSingleton<IConsumer<TKey, TValue>>(sp => sp.GetRequiredService<ConsumerConnectionFactory<TKey, TValue>>().Create()); 121builder.Services.AddKeyedSingleton<ConsumerConnectionFactory<TKey, TValue>>(serviceKey, (sp, key) => CreateConsumerConnectionFactory<TKey, TValue>(sp, configureBuilder, settings)); 122builder.Services.AddKeyedSingleton<IConsumer<TKey, TValue>>(serviceKey, (sp, key) => sp.GetRequiredKeyedService<ConsumerConnectionFactory<TKey, TValue>>(key).Create()); 142var connectionFactory = serviceKey is null 143? sp.GetRequiredService<ConsumerConnectionFactory<TKey, TValue>>() 144: sp.GetRequiredKeyedService<ConsumerConnectionFactory<TKey, TValue>>(serviceKey); 161private static ConsumerConnectionFactory<TKey, TValue> CreateConsumerConnectionFactory<TKey, TValue>(IServiceProvider serviceProvider, Action<IServiceProvider, ConsumerBuilder<TKey, TValue>>? configureBuilder, KafkaConsumerSettings settings)