static void SendFeedbackMessage(MsgType type, string action, DateTimeOffset actionTime, dynamic content) { if (Program.StartingTimeApp < actionTime) { ProducerHelper.SendMessage(MessageTopic.GoalFeedback, new Feedback(type: type, action: action, content: content)).GetAwaiter().GetResult(); } }
public IActionResult PostCommon([FromBody] Msg msg) { msg.ToFix(); var task = ProducerHelper.SendMessage(MessageTopic.Common, msg); task.GetAwaiter().GetResult(); return(StatusCode(StatusCodes.Status200OK)); }
public IActionResult Post([FromBody] Msg msg) { // msg.Metadata = JsonConvert.DeserializeAnonymousType<dynamic>(msg.Metadata.ToString(), msg.Metadata); // msg.Content = JsonConvert.DeserializeAnonymousType<dynamic>(msg.Content.ToString(), msg.Content); msg.ToFix(); var task = ProducerHelper.SendMessage(MessageTopic.Task, msg); task.GetAwaiter().GetResult(); return(StatusCode(StatusCodes.Status200OK)); }
static void SendMessage(MsgType type, string action, dynamic content) => ProducerHelper.SendMessage(MessageTopic.RepeatFeedback, new Feedback(type: type, action: action, content: content)).GetAwaiter().GetResult();