RabbitMQ 示例
安装兔子宝石:
$ gem install bunny --version " >= 0.9.1 "
启动一名或多名工人(子):
$ ruby work_queue/worker.rb
将任务添加到队列(pub):
$ ruby work_queue/new_task.rb A hard task !
...并检查您的工人:
[ * ] Waiting for messages in task_queue. To exit press CTRL+C
[x] Received ' A hard task! '
[x] Done