awslabs / amazon-kinesis-client-ruby

A Ruby interface for the Amazon Kinesis Client Library. Allows developers to easily create robust application to process Amazon Kinesis streams in Ruby.
Apache License 2.0
146 stars 56 forks source link

--shards option is not working correctly in sample producer #9

Closed davidor closed 4 years ago

davidor commented 9 years ago

The --shards option of the sample producer is not working as expected.

When the number of shards is specified like this for example: "./sample_kcl_producer.rb --stream 'myStream' --shards 1", instead of creating or using the stream 'myStream', the program creates a stream called "1", or uses it if it exists already.

Streams are always created with the default number of shards (2), because the option --shards does not work.

This happens because a bug in this line of code: https://github.com/awslabs/amazon-kinesis-client-ruby/blob/master/samples/sample_kcl_producer.rb#L114