Pass stream name and consumer to KinesisConsumer

An instance of `KinesisConsumer` was constucted through a factory that
receives the stream name and the message processor as arguments.

Such arguments however were ignored and the `KinesisConsumer` was
instantiated with the corresponding class fields set as `null`.

Those class fields (`streamName` and `messageProcessor`) were then
populated when `subscribe()` was called, by providing again `streamName`
and `messageProcessor` as arguments.

This was the wrong way of populating `streamName` and
`messageProcessor`, it forced those arguments to be mutable and thus be
`null`, until the `subscribe()` method was called.

Pass stream name and consumer to KinesisConsumer via the existing
Factory by annotating them as @Assisted parameters. This allows to
remove arguments from the `subscribe()` method, since the
`KinesisConsumer` already has those set as class fields.

Change-Id: I1b102fe55b769f4b2899d4ff3fa7e64d36355fa6
2 files changed
tree: 7e6ae5fde1e50e6bdaa10e958e22b5725ad34302
  1. src/
  2. BUILD
  3. external_plugin_deps.bzl
  4. Jenkinsfile
  5. LICENSE
  6. README.md
README.md

events-aws-kinesis

Provide producer and consumer of events streamed over AWS kinesis.

Build

Information on how to build this plugin can be found here

Configuration

Information on how to configure this plugin can be found here