public async Task <ActionResult> DeleteRetainedApplicationMessage(string topic) { topic = HttpUtility.UrlDecode(topic); await _mqttServerService.PublishAsync(new MqttApplicationMessageBuilder().WithTopic(topic).WithRetainFlag().Build()); return(StatusCode((int)HttpStatusCode.NoContent)); }
public async Task <ActionResult> PostMessage(MqttApplicationMessage message) { await _mqttServerService.PublishAsync(message); return(Ok()); }