$ ./beanstalkd -d -l 10.0.1.5 -p 11300
This starts up beanstalkd
as a daemon listening on address 10.0.1.5, port 11300.
Here’s an example in Ruby (see the client libraries to find your favorite language).
First, have one process put a job into the queue:
beanstalk = Beanstalk::Pool.new(['10.0.1.5:11300'])
beanstalk.put('hello')
Then start another process to take jobs out of the queue and run them:
beanstalk = Beanstalk::Pool.new(['10.0.1.5:11300'])
loop do
job = beanstalk.reserve
puts job.body # prints "hello"
job.delete
end
Many thanks to memcached for providing inspiration for simple protocol design and for the structure of the documentation. Not to mention a fantastic piece of software!