go-kit-kafka

module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2021 License: MIT

README

go-kit-kafka

Apache Kafka integration module for go-kit

build version report coverage release reference

Getting started

Go modules are supported.

Manual install:

go get -u github.com/alebabai/go-kit-kafka

Golang import:

import "github.com/alebabai/go-kit-kafka/kafka"

Reference

TBD

Usage

Consumer

To use consumer transport abstractions the following adapters for the chosen Apache Kafka client library should be implemented:

type Message interface {
	Topic() string
	Partition() int
	Offset() int64
	Key() []byte
	Value() []byte
	Headers() []Header
	Timestamp() time.Time
}


type Header interface {
	Key() string
	Value() []byte
}


type Reader interface {
	ReadMessage(ctx context.Context) (Message, error)
	Committer
	io.Closer
}

type Committer interface {
    Commit(ctx context.Context) error
}

Examples

Go to Examples.

Directories

Path Synopsis
examples
common module
confluent module
sarama module
tracing

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL