Interface IConfluentProducersCache
Creates and stores the Confluent.Kafka.IProducer<TKey, TValue> instances in order to reuse them for the same KafkaProducerConfig configuration.
Namespace: Silverback.Messaging.Broker.Kafka
Assembly: Silverback.Integration.Kafka.dll
Syntax
public interface IConfluentProducersCache
Methods
| Improve this doc View sourceDisposeProducer(KafkaProducer)
Disposes the Confluent.Kafka.IProducer<TKey, TValue> for the specified KafkaProducerConfig and removes it from the cache.
Declaration
void DisposeProducer(KafkaProducer ownerProducer)
Parameters
Type | Name | Description |
---|---|---|
KafkaProducer | ownerProducer | The KafkaProducer that owns the producer to be disposed. |
GetProducer(KafkaProducer)
Gets an Confluent.Kafka.IProducer<TKey, TValue> compatible with the specified KafkaProducerConfig.
Declaration
IProducer<byte[]?, byte[]?> GetProducer(KafkaProducer ownerProducer)
Parameters
Type | Name | Description |
---|---|---|
KafkaProducer | ownerProducer | The KafkaProducer that needs the producer. |
Returns
Type | Description |
---|---|
IProducer<byte[], byte[]> | The Confluent.Kafka.IProducer<TKey, TValue>. |