コード例 #1
0
 public async Task PublishMessageAsync(MotorCloudEvent <byte[]> motorCloudEvent, CancellationToken token = default)
 {
     var topic   = motorCloudEvent.GetKafkaTopic() ?? _options.Topic;
     var message = CloudEventToKafkaMessage(motorCloudEvent);
     await _producer.ProduceAsync(topic, message, token);
 }