Hi Nicholas,
Thanks for responding. In my case I want to specifically avoid transmitting another message to subscribed clients – I just want to silently delete the retained message for those topics. I don’t want the clients to have to deal with an
empty message, which they would presumably see as not well-formed.
Regards,
Andrew
Andrew Thomas
Skkynet Cloud Systems, Inc.
T 1 905 702 7851 ext 104
|
|
From: Nicholas Humfrey <njh@xxxxxxxxxx>
Sent: Friday, April 5, 2024 7:40 AM
To: General development discussions for the mosquitto project <mosquitto-dev@xxxxxxxxxxx>
Cc: Andrew Thomas <andrew.thomas@xxxxxxxxxxx>
Subject: Re: [mosquitto-dev] Is there a function in the broker to "delete" a topic
Hi Andrew,
I don’t know about internal functions. But to delete a retained message, a client can send an empty message with the retain flag set.
Hello all,
I am customizing the mosquitto broker, and I would like to be able to “delete” a topic. As I understand it, that really just means removing retained messages for that topic. I realize that the topic will re-appear if
a client sends a new message to it, but this would still be very useful for my application.
Are there functions in the broker code that:
- Remove the retained message for a topic, and
- Remove the retained messages for a topic and all its descendants?
Thanks,
Andrew
_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/mosquitto-dev
|