knuckolls/logstash — comment on commit b25422a4730ed4f94d02df40222d0861357790ae
File:  line 0
By knuckolls:

@lusis thanks!

My experience is only limited to RabbitMQ but it appears to me that the arguments are meant to be variables to tune specifics of an individual amqp broker's implementation. In that case, I think the most common use cases should be documented and that the arguments config should stay the way it is. As far as I've seen just digging through things the x-ha-policy argument is used on queues to denote that the broker should treat them as mirrored. I also saw x-expires and x-message-ttl as other arguments when declaring a queue.

I didn't consider that exchanges might have an arguments table in the 0.9.1 spec but I looked it up via the amq-protocol rubygems docs [1] and it does show that some brokers might have arguments as well. Docs for the exchanges [2] and the queues [3] are at these links respectively. The bindings themselves may have arguments but I'm not sure how those are intended to be configured via the amqp input and output plugins anyway. Looking specifically at the RabbitMQ docs it appears that only the queues and not the exchanges actually have any arguments to configure. [4]

I did a little safari through the config parser code to see if I could make arguments actually accept a Hash instead of just an array but that portion of the logstash code is rather impenetrable and I was just trying to get something out the door that others could use. Someone more familiar with that part of the codebase should probably attack that problem if it's deemed worth it.

Hope that helps. Let me know if you have any more questions while this is all fresh on my mind. :)

[1] http://rubygems.org/gems/amq-protocol
[2] http://rubydoc.info/gems/amq-protocol/0.9.0/AMQ/Protocol/Exchange/Declare
[3] http://rubydoc.info/gems/amq-protocol/0.9.0/AMQ/Protocol/Queue/Declare
[4] http://www.rabbitmq.com/amqp-0-9-1-quickref.html