max_length
値が 10000の既存のうさぎキューに接続する次の ruby 関数があります。
def self.send(settings, event_str)
conn = Bunny.new(
hostname: settings['host'],
username: settings['user'],
password: settings['password'],
virtual_host: settings['virtual_host']
)
conn.start
ch = conn.create_channel
q = ch.queue(
settings['queue'],
durable: true,
auto_delete: false,
x_max_length: 10000
)
ch.default_exchange.publish(event_str, :routing_key => q.name)
end
呼び出されると、次のエラーが返されます。
PRECONDITION_FAILED - inequivalent arg 'x-max-length' for queue 'event_queue' in vhost '/sensu': received none but current is the value '100000' of type 'signedint'
バニー版:2.0.1 Ruby版:2.3.1
さまざまなパラメーターを試してみましたch.queue
が、最大キュー長の値を設定する方法が見つかりません。
提案を歓迎します。