beanstalkd java使用_消息队列 beanstalkd 介绍

首先 好东西

http://kr.github.com/beanstalkd/

其次 真的是好东西 支持 java , python ,perl,ruby,erlang 和我不知道的 语言

官方的原文介绍:

$ ./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.

Use It

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

Thanks

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!

整理 www.blogjava.net/Good-Game

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值