Skip to content

TopicProducer

QuixStreams.Streaming

QuixStreams.Streaming

TopicProducer Class

Implementation of ITopicProducer to produce outgoing streams

public class TopicProducer :
QuixStreams.Streaming.ITopicProducer,
System.IDisposable

Inheritance System.Object 🡒 TopicProducer

Implements ITopicProducer, System.IDisposable

Constructors
TopicProducer(KafkaProducerConfiguration, string) Initializes a new instance of TopicProducer
TopicProducer(Func<string,TelemetryKafkaProducer>) Initializes a new instance of TopicProducer
Methods
CreateStream() Creates a new stream and returns the related stream producer to operate it.
CreateStream(string) Creates a new stream and returns the related stream producer to operate it.
Dispose() Flushes pending data to the broker and disposes underlying resources
Flush() Flushes pending data to the broker
GetOrCreateStream(string, Action<IStreamProducer>) Retrieves a stream that was previously created by this instance, if the stream is not closed, otherwise creates a new stream.
GetStream(string) Retrieves a stream that was previously created by this instance, if the stream is not closed.
RemoveStream(string) Removes a stream from the internal list of streams
Events
OnDisposed Raised when the resource finished disposing