public ActionResult Get(string queue = "") { var obj = _messageAppService.CreateMessage(ControllerContext.RouteData.Values["controller"].ToString()); using (IConnection connection = new ConnectionFactory().CreateConnection()) { using (IModel channel = connection.CreateModel()) { channel.QueueDeclare(queue, false, false, false, null); channel.BasicPublish(string.Empty, queue, null, _messageAppService.EncodeMessage(obj)); } } return(Ok(true)); }