Created
March 8, 2022 20:40
-
-
Save awswithdotnet/776e262fe665ec7e5a14d82a3c0614cc to your computer and use it in GitHub Desktop.
kafka KafkaMessageProducer Partial 7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_producer = new ProducerBuilder<String, String>(config).Build(); | |
_producer.Produce(_topic, new Message<string, string> { Key = Guid.NewGuid().ToString(), Value = "New Message: " + DateTime.Now.ToString() }, deliveryReportHandler); | |
_producer.Flush(TimeSpan.FromSeconds(_flushTime)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment