Skip to content
Open
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions docs/input-rabbitmq.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ This plugin supports the following configuration options plus the <<plugins-{typ
| <<plugins-{type}s-{plugin}-host>> |<<string,string>>|Yes
| <<plugins-{type}s-{plugin}-key>> |<<string,string>>|No
| <<plugins-{type}s-{plugin}-metadata_enabled>> |<<boolean,boolean>>|No
| <<plugins-{type}s-{plugin}-max_inbound_message_body_size>> |<<number,number>>|No
| <<plugins-{type}s-{plugin}-passive>> |<<boolean,boolean>>|No
| <<plugins-{type}s-{plugin}-password>> |<<password,password>>|No
| <<plugins-{type}s-{plugin}-port>> |<<number,number>>|No
Expand Down Expand Up @@ -259,6 +260,13 @@ This is only relevant for direct or topic exchanges.
* Routing keys are ignored on fanout exchanges.
* Wildcards are not valid on direct exchanges.

[id="plugins-{type}s-{plugin}-max_inbound_message_body_size"]
===== `max_inbound_message_body_size`

* Value type is <<number,number>>

If unspecified then max_inbound_message_body_size of 67108864 bytes will be used.

[id="plugins-{type}s-{plugin}-metadata_enabled"]
===== `metadata_enabled`

Expand Down
4 changes: 4 additions & 0 deletions lib/logstash/plugin_mixins/rabbitmq_connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ def setup_rabbitmq_connection_config
# Heartbeat delay in seconds. If unspecified no heartbeats will be sent
config :heartbeat, :validate => :number

# Max inbound message size in bytes. If not specified default value of 67108864 bytes will be used
config :max_inbound_message_body_size, :validate => :number

# Passive queue creation? Useful for checking queue existance without modifying server state
config :passive, :validate => :boolean, :default => false

Expand Down Expand Up @@ -104,6 +107,7 @@ def rabbitmq_settings

s[:connection_timeout] = @connection_timeout || 0
s[:requested_heartbeat] = @heartbeat || 0
s[:max_inbound_message_body_size] = @max_inbound_message_body_size || 67108864

if @ssl
s[:tls] = @ssl_version
Expand Down
5 changes: 5 additions & 0 deletions spec/plugin_mixins/rabbitmq_connection_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def register

let(:rabbitmq_settings) { super().merge({"connection_timeout" => 123,
"heartbeat" => 456,
"max_inbound_message_body_size" => 789,
"ssl" => true,
"ssl_version" => "TLSv1.1",
"ssl_certificate_path" => path,
Expand All @@ -63,6 +64,10 @@ def register
expect(instance.rabbitmq_settings[:requested_heartbeat]).to eql(rabbitmq_settings["heartbeat"])
end

it "should set max_inbound_message_body_size to the expected value" do
expect(instance.rabbitmq_settings[:max_inbound_message_body_size]).to eql(rabbitmq_settings["max_inbound_message_body_size"])
end

it "should set tls to the expected value" do
expect(instance.rabbitmq_settings[:tls]).to eql("TLSv1.1")
end
Expand Down