Пример #1
0
 /// <summary>
 /// Produce a <paramref name="message"/> on Kafka including <paramref name="headers"/>
 /// </summary>
 /// <param name="message">The message</param>
 /// <param name="headers">The message headers</param>
 public async Task Produce(object message, Dictionary <string, object> headers)
 {
     var payloadDescriptor = _payloadDescriptorFactory.Create(message, headers);
     await _kafkaProducer.Produce(payloadDescriptor);
 }
Пример #2
0
 /// <summary>
 /// Produce a <paramref name="message"/> on Kafka
 /// </summary>
 /// <param name="message">The message</param>
 /// <param name="headers">The message headers</param>
 public async Task Produce(object message, Metadata headers)
 {
     var payloadDescriptor = _payloadDescriptorFactory.Create(message, headers);
     await _kafkaProducer.Produce(payloadDescriptor);
 }
Пример #3
0
 public async Task Produce(OutboxMessage message)
 {
     var outgoingMessage = BuildOutgoingMessage(message);
     await _kafkaProducer.Produce(outgoingMessage);
 }