1 instantiation of ProducerConnectionFactory
Aspire.Confluent.Kafka (1)
AspireKafkaProducerExtensions.cs (1)
162=> new(CreateProducerBuilder(serviceProvider, configureBuilder, settings), settings.Config);
8 references to ProducerConnectionFactory
Aspire.Confluent.Kafka (8)
AspireKafkaProducerExtensions.cs (8)
116builder.Services.AddSingleton<ProducerConnectionFactory<TKey, TValue>>(sp => CreateProducerConnectionFactory<TKey, TValue>(sp, configureBuilder, settings)); 117builder.Services.AddSingleton<IProducer<TKey, TValue>>(sp => sp.GetRequiredService<ProducerConnectionFactory<TKey, TValue>>().Create()); 121builder.Services.AddKeyedSingleton<ProducerConnectionFactory<TKey, TValue>>(serviceKey, (sp, key) => CreateProducerConnectionFactory<TKey, TValue>(sp, configureBuilder, settings)); 122builder.Services.AddKeyedSingleton<IProducer<TKey, TValue>>(serviceKey, (sp, key) => sp.GetRequiredKeyedService<ProducerConnectionFactory<TKey, TValue>>(key).Create()); 142var connectionFactory = serviceKey is null 143? sp.GetRequiredService<ProducerConnectionFactory<TKey, TValue>>() 144: sp.GetRequiredKeyedService<ProducerConnectionFactory<TKey, TValue>>(serviceKey); 161private static ProducerConnectionFactory<TKey, TValue> CreateProducerConnectionFactory<TKey, TValue>(IServiceProvider serviceProvider, Action<IServiceProvider, ProducerBuilder<TKey, TValue>>? configureBuilder, KafkaProducerSettings settings)