/// <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); }
/// <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); }
public async Task Produce(OutboxMessage message) { var outgoingMessage = BuildOutgoingMessage(message); await _kafkaProducer.Produce(outgoingMessage); }