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));
        }
Esempio n. 2
0
        public async Task <ActionResult> PostMessage(MqttApplicationMessage message)
        {
            await _mqttServerService.PublishAsync(message);

            return(Ok());
        }