Пример #1
0
 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();
     }
 }
Пример #2
0
        public IActionResult PostCommon([FromBody] Msg msg)
        {
            msg.ToFix();
            var task = ProducerHelper.SendMessage(MessageTopic.Common, msg);

            task.GetAwaiter().GetResult();
            return(StatusCode(StatusCodes.Status200OK));
        }
Пример #3
0
        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));
        }
Пример #4
0
 static void SendMessage(MsgType type, string action, dynamic content)
 => ProducerHelper.SendMessage(MessageTopic.RepeatFeedback, new Feedback(type: type, action: action, content: content)).GetAwaiter().GetResult();