Skip to content

robbles/kinesis_worker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Kinesis Worker

A worker implementation for reading from Kinesis efficiently. Start a StreamWorker with a given StreamName, and a worker goroutine will be started automatically for each shard.

Example usage:

stream := kinesis_worker.StreamWorker{
    Region:       "us-west-1",
    StreamName:   "events",
    IteratorType: "LATEST",
    BatchSize:    100,
    SleepTime:    time.Second * 1,
}

err := stream.Start()
if err {
    // one or more workers failed to start, check configuration
}

for record := range stream.Output {
    // handle kinesis_worker.Record (*kinesis.Record)
}

About

Automatic pool of worker processes for consuming from a Kinesis stream

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages