Logstash Kinesis Plugin - with_kinesisEndpoint - Undefined Method

Trying to use the Logstash Kinesis Plugin with a custom endpoint. In the config, I've got the following line:

additional_settings => {"kinesisEndpoint" => "https://<URL to my endpoint>"}

but I'm getting a strange error message in the log:

[ERROR][logstash.javapipeline    ][kinesis] Pipeline error {:pipeline_id=>"kinesis", :exception=>#<NoMethodError: undefined method `with_kinesisEndpoint' for #<Java::ComAmazonawsServicesKinesisClientlibraryLibWorker::KinesisClientLibConfiguration:0x3731691c>>, :backtrace=>["/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-kinesis-2.1.2-java/lib/logstash/inputs/kinesis.rb:130:in `block in register'", "org/jruby/RubyHash.java:1415:in `each'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-kinesis-2.1.2-java/lib/logstash/inputs/kinesis.rb:128:in `register'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:228:in `block in register_plugins'", "org/jruby/RubyArray.java:1809:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:227:in `register_plugins'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:386:in `start_inputs'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:311:in `start_workers'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:185:in `run'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:137:in `block in start'"], "pipeline.sources"=>["/etc/logstash/conf.d/kinesis.conf"], :thread=>"#<Thread:0xdf47df run>"}

Anybody seen this problem before?

The code allows you to call arbitrary "withX()" functions using the additional_settings option. The actual methods, such as withKinesisEndpoint do not have an underscore.

The underscore is meant to cause the following letter to be uppercase (and the underscore dropped). So that a snake case kinesis_endpoint in additional_settings becomes with_kinesis_endpoint, and something, and I cannot for the life of me figure out what, converts that to withKinesisEndpoint before calling it.

Looking at the spec and the CI build it appears to test both valid and invalid additional settings (expecting exactly this NoMethodError for invalid settings) yet the CI passes.

Just noticed the documentation says " you may invoke any one of the withX() functions that take a primitive by providing key-value pairs in snake_case". Change "kinesisEndpoint" to "kinesis_endpoint".

Thanks! That's what I was missing!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.