I'm not aware of an embedded solution for a distributed queue. I'd likely try RabbitMQ in that scenario.
However, if you want a local persistent queue with absolutely no external dependencies, then the solution would not be overly complex. I don't know if there are libraries which do this out of the box, but rolling your own simple solution would IMO not be too complicated, and is at least a nice exercise of a bit of OTP
The idea is to have an in-memory queue, and persist the queue state to disk every time an item is added, and every time the job succeeds.
Persisting without an external component can be done in a couple of ways:
In a simplest solution, you'd have one process, a GenServer, which would act as a scheduler. The scheduler reads from the queue file, and starts the first job in a separate process. If the job succeeds, the scheduler removes it, persists the new queue state, and starts the next job, if there is one. The scheduler should also monitor the job process (or link to it), to detect if it crashed. Then you need to handle the crash by retrying, deferring the job, giving up.
Every time you want to add another item, you send a request to the scheduler, which adds it to the end of the in memory structure (for example
:queue), stores to disk, and starts the job if nothing is running.
I'd suggest to try rolling a simple implementation, perhaps starting with a plain in-memory queue, and then adding naive persistence with
If you have more elaborate needs, such as pooled or rate-limited queues, you could take a look at jobs. I'm actually using it myself for these particular cases, and I'm quite happy with it.