0
我嘗試使用Bunny for Azure EventHubs,實際上Bunny支持AMQP 0.9.1,而AMQP 0.9.1與AMQP 1.0兼容。我可以在EventHub上使用ruby模塊'Bunny'嗎?
但是,我執行下面的代碼時發生錯誤。
conn = Bunny.new('amqps://[username]:[password]@[namespace].servicebus.windows.net/[virtualhost]', :ssl => true)
conn.start
AMQ::Protocol::FrameTypeError: Must be one of [:method, :headers, :body, :heartbeat]
from /opt/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/amq-protocol-1.9.2/lib/amq/protocol/frame.rb:64:in `decode_header'
from /opt/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bunny-1.6.3/lib/bunny/transport.rb:243:in `read_next_frame'
from /opt/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bunny-1.6.3/lib/bunny/session.rb:947:in `init_connection'
from /opt/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bunny-1.6.3/lib/bunny/session.rb:275:in `start'
from (irb):5
from /opt/rbenv/versions/2.1.2/bin/irb:11:in `<main>'
有誰知道如何解決它?或者它不能用於EventHubs?
我的環境如下:
- 的CentOS:6.6
- 紅寶石:2.1.2
- 兔兔:1.6.3
- 兔子協議版本:0.9.1