Interface IKafkaTransactionalProducerCollection
Return a KafkaProducer that can be used to produce messages in a transaction. These producer are used through the KafkaTransactionalProducer.
Inherited Members
Namespace: Silverback.Messaging.Broker
Assembly: Silverback.Integration.Kafka.dll
Syntax
public interface IKafkaTransactionalProducerCollection : IReadOnlyCollection<KafkaProducer>, IEnumerable<KafkaProducer>, IEnumerable
Methods
GetOrCreateAsync(string, KafkaProducerConfiguration, IOutboundEnvelope, IKafkaTransaction)
Gets or creates a KafkaProducer for the specified endpoint and transaction.
Declaration
ValueTask<KafkaProducer> GetOrCreateAsync(string name, KafkaProducerConfiguration configuration, IOutboundEnvelope envelope, IKafkaTransaction transaction)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The endpoint name. It could be either the topic/queue name or the friendly name. |
| KafkaProducerConfiguration | configuration | The KafkaProducerConfiguration containing the endpoint configuration. |
| IOutboundEnvelope | envelope | The IOutboundEnvelope containing the message to be produced. |
| IKafkaTransaction | transaction | The IKafkaTransaction to be used to produce the messages. |
Returns
| Type | Description |
|---|---|
| ValueTask<KafkaProducer> | The KafkaProducer. |