-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Labels
Description
e.g. when a JMS factory setter accepts a boolean
(int
, long
should work but could use a test) value the plugin will fail to start:
input {
jms {
broker_url => '(tcp://activemq:61616)/?initialReconnectDelay=100'
destination => 'myqueue'
factory => 'org.apache.activemq.ActiveMQConnectionFactory'
username => 'admin'
password => 'password'
# Message selector
selector => "string_property = 'this' OR int_property < 3"
# Connection factory specific settings
factory_settings => {
exclusive_consumer => true
}
require_jars => ['./apache-activemq-5.16.0/activemq-all-5.16.0.jar']
}
}
this will attempt to do a factory.setExclusiveConsumer but will fail due the parameter being "true"
instead of true
.
[2020-10-27T09:34:41,458][WARN ][logstash.inputs.jms ][main]
JMS Consumer Died {:exception=>"TypeError", :exception_message=>"cannot convert instance of class org.jruby.RubyString to boolean", :backtrace=>[
"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/jruby-jms-1.3.0-java/lib/jms/connection.rb:193:in `block in initialize'",
"org/jruby/RubyHash.java:1415:in `each'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/jruby-jms-1.3.0-java/lib/jms/connection.rb:188:in `initialize'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-jms-3.1.2-java/lib/logstash/inputs/jms.rb:225:in `run'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:405:in `inputworker'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:396:in `block in start_input'"]} ...
... relevant jruby-jms line simply does a send
, this should be considered when migrating from using the gem #50
The issue originates from a LS bug report: elastic/logstash#12343