public EventLog(IntegrationEvent evt) { EventId = evt.Id; CreationTime = DateTime.Now; EventTypeName = evt.GetType().FullName; Content = evt.ToJson(); State = EventStateEnum.NotPublished; TimesSent = 0; }
public async Task Publish(IntegrationEvent @event, string topic) { var message = @event.ToJson(); await _kafkaProducer.SendMessage(message, topic); }