Skip to content
Stephen Jennings edited this page Mar 23, 2015 · 3 revisions

Turbocharged.Beanstalk is a .NET client for Beanstalk, an outrageously simple job queue.

Just about everything in Turbocharged.Beanstalk returns a Task<T> and is meant to play quite nicely with C#'s async/await keywords.

The rules of the road:

  • Producers are meant for inserting jobs, consumers are meant for reserving jobs.

  • An IProducer can be shared among many callers. Producer calls do not block.

  • An IConsumer can be shared, but be aware that a call to ReserveAsync will block future calls on the connection until:

    • A job is reserved
    • The server responds with DEADLINE_SOON (ReserveAsync returns null)
    • The reserve command times out (ReserveAsync throws a TimeoutException)
  • A worker is a dedicated TCP connection which reserves jobs in a loop. A worker is created with a delgate with signature Func<IWorker, Job, Task>. As soon a job is reserved, the delegate is called. The delegate is responsible for calling IWorker.DeleteAsync() to delete the job. You dispose the worker to stop the connection.

Clone this wiki locally