Exemplo n.º 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();
     }
 }
Exemplo n.º 2
0
        public IActionResult PostCommon([FromBody] Msg msg)
        {
            msg.ToFix();
            var task = ProducerHelper.SendMessage(MessageTopic.Common, msg);

            task.GetAwaiter().GetResult();
            return(StatusCode(StatusCodes.Status200OK));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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();