I have the following line in my Logstash RabbitMQ input:
arguments => { "x-max-length" => 250000 }
I want the value to be easily changable, so I would like to store it in an enviromental variable.
arguments => { "x-max-length" => ${RMQ_ARG_X_MAX} }
However this yields the following error on startup:
Expected one of #, \", ', -, [, { at <some portion of the pipeline configuration> arguments => { \"x-max-length\" => "}
If I change the config to
arguments => { "x-max-length" => "${RMQ_ARG_X_MAX}" }
Then I'll receive the following error:
[WARN ][logstash.inputs.rabbitmq ] Error while setting up connection for rabbitmq input! Will retry. {:message=>"#method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - inequivalent arg 'x-max-length'for queue '' in vhost '/': received the value '250000' of type 'longstr' but current is the value '250000' of type 'long', class-id=50, method-id=10)", :class=>"MarchHare::ChannelAlreadyClosed", :location=>"/usr/share/logstash/vendor/bundle/jruby/1.9/gems/march_hare-2.22.0-java/lib/march_hare/exceptions.rb:121:in `convert_and_reraise'"}
What should I do? It appears to me as if it only accepts the value as a number if I hardcode it to the pipeline configuration.