12345678910111213141516171819202122 |
- using RestSharp;
- using SMP.Contract.Message;
- using SMP.Message.Consumer.Config;
- using SMP.Model.ExportTask;
- namespace SMP.Message.Consumer.MQConsumers
- {
- public class ExportTaskMessageConsumer : BaseConsumer<Finance_ExportTask>
- {
- 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;
- }
- }
- }
|