-
-
Notifications
You must be signed in to change notification settings - Fork 1
Kafka
Bernardo Teixeira edited this page Oct 26, 2021
·
3 revisions
I'm using Confluent.Kafka version 1.8.1. I'm also Serilog for all the logging and Newtonsoft.Json for serialization and deserialization.
To register the ApolloBus, you need to AddKafka(...) StartupFile
public void ConfigureServices(IServiceCollection services) { services.AddKafka(Configuration); ... }
To add the configuration, you need to write in your appsettings the following code.
"Kafka": { "ProducerConfig": { "BootstrapServers": "localhost:9092", "MessageTimeoutMs": "10000" }, "ConsumerConfig": { "BootstrapServers": "localhost:9092" } }
To add configuration we need to add the object ProducerConfig and ConsumerConfig