Is there a way to temporarily pause publishes or 'lock' a topic without losing payloads?

Basically, is there a way for me to ‘lock’ a topic so that the engine can process all the tags, save them to the database, delete them, and then ‘unlock’ the topic to resume publishing? And if there were any attempted publishes while the topic was ‘locked’ those would just wait or get queued until the topic is ‘unlocked’ and is allowing publishes again.

I’m working for a client and don’t have access to the transmitter and I also can’t add any tags, like a simple boolean for when publishes are allowed or not allowed.

The tags get published to the topic deeply nested in folders, so if I want to consume all the tags in all the folders and then delete the top lever folder, there’s a race condition between checking to see if the folder is empty and deleting the folder. (Since its technically possible that a new tag gets published in the folder in between checking if its empty and then deleting it)

The client essentially wants a flow where every 10 mins or so, all the tags in a topic get read, saved to the database, and then removed so they’re not saving duplicate data to the database.

Maybe there’s a way I can message the transmitter to stop publishes until messaged to resume or something, any help would be greatly appreciated!

Sorry if this question is confusing, English isn’t my first language

Are you using MQTT Transmission at the Edge or some other Sparkplug edge node implementation? If so, data is not duplicated as only ‘change events’ are ever sent.

Also, there isn’t a way to lock/unlock topics. However, we do have a way of pausing MQTT Engines processing of incoming data using what we call ‘latching’. See this for more info: MQTT Engine Tag Latching - MQTT Modules for Ignition 8.x - Confluence