Пример #1
0
 public KafkaProducer(
     IKafkaClient client,
     KafkaEventBus publisher)
 {
     this.publisher = publisher;
     this.client    = client;
 }
Пример #2
0
 public Task Work(KafkaEventBus bus)
 {
     if (eventBusDictionary.TryAdd(bus.ProducerType, bus))
     {
         eventBusList.Add(bus);
     }
     else
     {
         throw new EventBusRepeatException(bus.ProducerType.FullName);
     }
     return(Task.CompletedTask);
 }