Show / Hide Table of Contents

    Class MockedConfluentProducerBuilder

    The builder for the Silverback.Messaging.Broker.Kafka.Mocks.MockedConfluentProducer.

    Inheritance
    object
    MockedConfluentProducerBuilder
    Implements
    IConfluentProducerBuilder
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: Silverback.Messaging.Broker.Kafka
    Assembly: Silverback.Integration.Kafka.Testing.dll
    Syntax
    public class MockedConfluentProducerBuilder : IConfluentProducerBuilder

    Constructors

    MockedConfluentProducerBuilder(IInMemoryTopicCollection, IInMemoryTransactionManager)

    Initializes a new instance of the MockedConfluentProducerBuilder class.

    Declaration
    public MockedConfluentProducerBuilder(IInMemoryTopicCollection topics, IInMemoryTransactionManager transactionManager)
    Parameters
    Type Name Description
    IInMemoryTopicCollection topics

    The IInMemoryTopicCollection.

    IInMemoryTransactionManager transactionManager

    The IInMemoryTransactionManager.

    Methods

    Build()

    Builds the Confluent.Kafka.IProducer<TKey, TValue> instance.

    Declaration
    public IProducer<byte[]?, byte[]?> Build()
    Returns
    Type Description
    IProducer<byte[], byte[]>

    The Confluent.Kafka.IProducer<TKey, TValue>.

    SetConfiguration(ProducerConfig)

    Sets the producer configuration.

    Declaration
    public IConfluentProducerBuilder SetConfiguration(ProducerConfig config)
    Parameters
    Type Name Description
    ProducerConfig config

    The configuration.

    Returns
    Type Description
    IConfluentProducerBuilder

    The IConfluentProducerBuilder so that additional calls can be chained.

    SetLogHandler(Action<IProducer<byte[]?, byte[]?>, LogMessage>)

    Set the handler to call when there is information available to be logged. If not specified, a default callback that writes to stderr will be used.

    Declaration
    public IConfluentProducerBuilder SetLogHandler(Action<IProducer<byte[]?, byte[]?>, LogMessage> logHandler)
    Parameters
    Type Name Description
    Action<IProducer<byte[], byte[]>, LogMessage> logHandler

    The event handler.

    Returns
    Type Description
    IConfluentProducerBuilder

    The IConfluentProducerBuilder so that additional calls can be chained.

    SetStatisticsHandler(Action<IProducer<byte[]?, byte[]?>, string>)

    Sets the handler to call on statistics events.

    Declaration
    public IConfluentProducerBuilder SetStatisticsHandler(Action<IProducer<byte[]?, byte[]?>, string> statisticsHandler)
    Parameters
    Type Name Description
    Action<IProducer<byte[], byte[]>, string> statisticsHandler

    The event handler.

    Returns
    Type Description
    IConfluentProducerBuilder

    The IConfluentProducerBuilder so that additional calls can be chained.

    Implements

    IConfluentProducerBuilder
    GitHub E-Mail
    ↑ Back to top © 2026 Sergio Aquilini