Bunny 介绍
Bunny 是一个非常受欢迎的、易用的、可维护的 RabbitMQ 2.0+ 的
Ruby 客户端开发包。
示例代码:
require "bunny" # Start a communication session with RabbitMQ conn = Bunny.new conn.start # open a channel ch = conn.create_channel # declare a queue q = ch.queue("test1") # publish a message to the default exchange which then gets routed to this queue q.publish("Hello, everybody!") # fetch a message from the queue delivery_info, metadata, payload = q.pop puts "This is the message: #{payload}" # close the connection conn.stop
Bunny 官网
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。