kinesis-consumer/README.md
2015-05-23 16:18:10 -07:00

2.8 KiB

Golang Kinesis Connectors

Kinesis connector applications written in Go

Inspired by the Amazon Kinesis Connector Library. These components are used for extracting streaming event data into S3, Redshift, DynamoDB, and more. See the API Docs for package documentation.

golang_kinesis_connector

Overview

Each Amazon Kinesis connector application is a pipeline that determines how records from an Amazon Kinesis stream will be handled. Records are retrieved from the stream, transformed according to a user-defined data model, buffered for batch processing, and then emitted to the appropriate AWS service.

A connector pipeline uses the following interfaces:

  • Pipeline: The pipeline implementation itself.
  • Transformer: Defines the transformation of records from the Amazon Kinesis stream in order to suit the user-defined data model. Includes methods for custom serializer/deserializers.
  • Filter: Defines a method for excluding irrelevant records from the processing.
  • Buffer: Defines a system for batching the set of records to be processed. The application can specify three thresholds: number of records, total byte count, and time. When one of these thresholds is crossed, the buffer is flushed and the data is emitted to the destination.
  • Emitter: Defines a method that makes client calls to other AWS services and persists the records stored in the buffer. The records can also be sent to another Amazon Kinesis stream.

Installation

Get the package source:

$ go get github.com/harlow/kinesis-connectors

Import the go-kinesis and kinesis-connector packages:

package main

import (
	"github.com/harlow/kinesis-connectors"
	"github.com/sendgridlabs/go-kinesis"
)

Example Pipelines

Examples pipelines are proviede in examples directory.

Logger

Default logging is handled by Package log. An application can override the defualt package logging by changing it's logger variable:

connector.SetLogger(NewCustomLogger())

The customer logger must implement the Logger interface.

Contributing

Please see CONTRIBUTING.md for more information. Thank you, contributors!

License

Copyright (c) 2015 Harlow Ward. It is free software, and may be redistributed under the terms specified in the LICENSE file.