Beispiel #1
0
 public IActionResult RemoveConsumer([FromBody] ApiRequestModel <string> requestModel)
 {
     if (VerifyRequestModel(requestModel))
     {
         var exchange_topic = requestModel.Data;
         var et             = exchange_topic.Split('&', StringSplitOptions.RemoveEmptyEntries);
         MessageCenterManager.Remove(et[0], et[1]);
         return(Json(new { Success = true, Message = "取消订阅成功!" }));
     }
     return(Json(new { Success = false, Message = "非法请求" }));
 }
 public IActionResult Remove(string Exchange, string Topic)
 {
     MessageCenterManager.Remove(Exchange, Topic);
     return(Json(new { Success = true, Message = "取消订阅成功!" }));
 }