public JsonResult sendmsg(string message, string friend)
        {
            RabbitMQBII obj  = new RabbitMQBII();
            IConnection con  = obj.GetConnection();
            bool        flag = obj.send(con, message, friend);

            return(Json(null));
        }
 public JsonResult receive()
 {
     try
     {
         RabbitMQBII obj       = new RabbitMQBII();
         IConnection con       = obj.GetConnection();
         string      userqueue = Session["username"].ToString();
         string      message   = obj.receive(con, userqueue);
         return(Json(message));
     }
     catch (Exception)
     {
         return(null);
     }
 }