Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/logstash/outputs/rabbitmq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,12 @@ class RabbitMQ < LogStash::Outputs::Base
# Should RabbitMQ persist messages to disk?
config :persistent, :validate => :boolean, :default => true

# Additional arguments for the exchange, for example could be the presence of an alternate exchange, ...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conflict here -- the :validate => :array doesn't match up with your default value (a hash).

Also, the documentation for this setting isn't quite enough. Can you detail why a user would want to set this?

Is "arguments" the right word? It feels like it is not specific enough of a word.

config :arguments, :validate => :array, :default => {}

def register
connect!
@hare_info.exchange = declare_exchange!(@hare_info.channel, @exchange, @exchange_type, @durable)
@hare_info.exchange = declare_exchange!(@hare_info.channel, @exchange, @exchange_type, @durable, @arguments)
@codec.on_event(&method(:publish))
end

Expand Down