Px::Service::Firehose
A simple Ruby Gem wrapper for Amazon Kinesis Firehose.
Built-in features:
- circuit breaker pattern on networking errors
- linear backoff on throughput error
- timed/length buffering and bulk sending
Installation
Add this line to your application's Gemfile:
gem 'px-firehose-client'
And then execute:
$ bundle
Or install it yourself as:
$ gem install px-firehose-client
Basic Configuration
Default configurations are set in Px::Service::Firehose, they can be changed by passing block to Px::Service::Firehose.configure
#queue_records
Call this function to queue up data blobs for dispatching.
#flush_records
Call this function to check and send data to Kinesis Firehose. If conditions pass, buffered data is consumed and flushed to Kinesis Firehose.
For documentation on CircuitBreaker usage, refer to Px-Service-Client docs.
Contributing
- Fork it ( https://github.com/[my-github-username]/px-firehose-client/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request