6

I'm using beanstalkd to managed queues. I just realised that if there are jobs in a queue and the beanstalkd process is restarted or crashes then the job is lost forever (or so I think).

Is there a way to preserve the jobs in the queue on beanstalkd failure or restart? If not, whats best practice to ensure jobs are never lost?

Alister Bulman
  • 34,482
  • 9
  • 71
  • 110
Wasim
  • 4,953
  • 10
  • 52
  • 87

1 Answers1

14

Beanstalkd can be started with the -b (binary log) option, and beanstalkd will write all jobs to a binlog. If the power goes out, you can restart beanstalkd with the same option and it will recover the contents of the log.

Alister Bulman
  • 34,482
  • 9
  • 71
  • 110