pioreactor icon indicating copy to clipboard operation
pioreactor copied to clipboard

clear old MQTT topics

Open CamDavidsonPilon opened this issue 4 years ago • 4 comments

When we create a new experiment, the old experiment topics in MQTT hang around. This consumes resources. Eventually things will break. We should drop these old topics somehow.

  • watchdog? Seems like a creep of it's use.

CamDavidsonPilon avatar Aug 03 '21 16:08 CamDavidsonPilon

There's a new feature in mosquito CLI that makes this easy, something like:

mosquitto_sub -t 'pioreactor/+/#' -T 'pioreactor/+/$experiment' --remove-retained --retained-only -E

But it's only available on mosquitto 1.6+, and default Raspberry Pi OS has 1.5.7. So we will wait until bullseye release

CamDavidsonPilon avatar Oct 05 '21 19:10 CamDavidsonPilon

Actually, I've slowly been having the job clean up after itself, ex: a5145f3a

CamDavidsonPilon avatar Mar 09 '22 00:03 CamDavidsonPilon

In next release, the pioreactor/latest_experiment topic is being dropped 🍻

With that gone, there's a more clear path to dropping old topics.

CamDavidsonPilon avatar Jan 01 '23 22:01 CamDavidsonPilon

With the next release, data isn't persisted, so it's unlikely that the dataset grows larger.

However, annoying _testing_experiment stuck around after a self-test is run.

CamDavidsonPilon avatar Apr 27 '24 13:04 CamDavidsonPilon

However, annoying _testing_experiment stuck around after a self-test is run.

we clear _testing_experiment data now

CamDavidsonPilon avatar May 30 '24 00:05 CamDavidsonPilon