"Persist" an :ets table or Registry for 24 hours (cross machine restarts)

Hello everyone! I’m writing code that deal with Amazon SQS (not FIFO queues though), which has one particular behavior:

Every message is delivered at least once within 24 hours. This means that I need to have a registry of already received messages to avoid handling them again.
However, 24 hours is a long time, I need to persist this to the filesystem in case the entire machine gets rebooted and reload it.

My old solution was simply writing a JSON file out of my ets table whenever I write a new message in there, but I’m open to alternatives and would like to hear if there is a better solution: I just discovered Registries which seems like a much better fit than an ets table.

Look at dets. It’s “disk based term storage”. At a basic level it’s basically ets written to the disk.

Yes that’s one of the solutions I was looking for! Thanks