Go Kinesis Producer Library

standard-readme compliant GoDoc

A Kinesis batch producer library for Amazon Kinesis built on top of the official Go AWS SDK and using the same aggregation format as the Kinesis Producer Library (KPL).

Features

  • Record Aggregation:
  • Backpressure
  • Rate Limit Aware
  • Shard Watcher
  • Custom Logging
  • Telemetry

Table of Contents

Background

Installation

Usage

import gk "github.com/dennis-tra/go-kinesis"

func main() {
	
	awsConfig, _ := config.LoadDefaultConfig(ctx)
	client := kinesis.NewFromConfig(awsConfig)
	
	p, err := NewProducer(client, "my-stream", gk.DefaultProducerConfig())

	ctx, stop := context.WithCancel(context.Background())
	go p.Start(ctx)

	p.Put(ctx, "partition-key", []byte("payload"))

	stop()

}