2 instantiations of ProducerConnectionFactory
Aspire.Confluent.Kafka (2)
AspireKafkaProducerExtensions.cs (2)
189? new(serviceProvider.GetRequiredService<InstrumentedProducerBuilder<TKey, TValue>>(), settings.Config) 190: new(serviceProvider.GetRequiredKeyedService<InstrumentedProducerBuilder<TKey, TValue>>(key),
8 references to ProducerConnectionFactory
Aspire.Confluent.Kafka (8)
AspireKafkaProducerExtensions.cs (8)
119builder.Services.AddSingleton<ProducerConnectionFactory<TKey, TValue>>(sp => CreateProducerConnectionFactory<TKey, TValue>(sp, settings)); 120builder.Services.AddSingleton<IProducer<TKey, TValue>>(sp => sp.GetRequiredService<ProducerConnectionFactory<TKey, TValue>>().Create()); 125builder.Services.AddKeyedSingleton<ProducerConnectionFactory<TKey, TValue>>(serviceKey, (sp, key) => CreateProducerConnectionFactory<TKey, TValue>(sp, settings, key as string)); 126builder.Services.AddKeyedSingleton<IProducer<TKey, TValue>>(serviceKey, (sp, key) => sp.GetRequiredKeyedService<ProducerConnectionFactory<TKey, TValue>>(key).Create()); 166var connectionFactory = serviceKey is null 167? sp.GetRequiredService<ProducerConnectionFactory<TKey, TValue>>() 168: sp.GetRequiredKeyedService<ProducerConnectionFactory<TKey, TValue>>(serviceKey); 185private static ProducerConnectionFactory<TKey, TValue> CreateProducerConnectionFactory<TKey, TValue>(