我尝试将Bunny用于Azure EventHubs,实际上Bunny支持AMQP 0.9.1,而AMQP 0.9.1与AMQP 1.0兼容。
但是,当我执行以下代码时出错。
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?
我的环境如下: