using RestSharp; using SMP.Contract.Message; using SMP.Message.Consumer.Config; using SMP.Model.ExportTask; namespace SMP.Message.Consumer.MQConsumers { public class ExportTaskMessageConsumer : BaseConsumer { public override void Consume(Finance_ExportTask message) { var options = new RestClientOptions(RabbitMqConfig.ExportTaskApi) { Timeout = -1, }; var client = new RestClient(options); RestRequest request = new RestRequest(); request.AddJsonBody(message); var result = client.ExecutePostAsync(request).Result; } } }