2 instantiations of ConsumerConnectionFactory
Aspire.Confluent.Kafka (2)
8 references to ConsumerConnectionFactory
Aspire.Confluent.Kafka (8)
AspireKafkaConsumerExtensions.cs (8)
119builder.Services.AddSingleton<ConsumerConnectionFactory<TKey, TValue>>(sp => CreateConsumerConnectionFactory<TKey, TValue>(sp, settings));
120builder.Services.AddSingleton<IConsumer<TKey, TValue>>(sp => sp.GetRequiredService<ConsumerConnectionFactory<TKey, TValue>>().Create());
125builder.Services.AddKeyedSingleton<ConsumerConnectionFactory<TKey, TValue>>(serviceKey, (sp, key) => CreateConsumerConnectionFactory<TKey, TValue>(sp, settings, key as string));
126builder.Services.AddKeyedSingleton<IConsumer<TKey, TValue>>(serviceKey, (sp, key) => sp.GetRequiredKeyedService<ConsumerConnectionFactory<TKey, TValue>>(key).Create());
166var connectionFactory = serviceKey is null
167? sp.GetRequiredService<ConsumerConnectionFactory<TKey, TValue>>()
168: sp.GetRequiredKeyedService<ConsumerConnectionFactory<TKey, TValue>>(serviceKey);
185private static ConsumerConnectionFactory<TKey, TValue> CreateConsumerConnectionFactory<TKey, TValue>(