/// <summary> /// TransactionalProducerStage /// </summary> public TransactionalProducerStage(bool closeProducerOnStop, ProducerSettings <K, V> settings) { _settings = settings; CloseProducerOnStop = closeProducerOnStop; ProducerProvider = errorHandler => _settings.CreateKafkaProducer(errorHandler); Shape = new FlowShape <IEnvelope <K, V, TPassThrough>, Task <IResults <K, V, TPassThrough> > >(In, Out); }
private async Task GivenInitializedTopic(string topic) { using (var producer = ProducerSettings.CreateKafkaProducer()) { await producer.ProduceAsync(topic, new Message <Null, string> { Value = InitialMsg }); } }