Skip to content

alebabai/go-kit-kafka

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-kit-kafka

Apache Kafka integration module for go-kit

build version report coverage tag 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"

Usage

To use consumer/producer transport abstractions converters to the following types from the chosen Apache Kafka client library should be implemented:

type Message struct {
    Topic     string
    Partition int32
    Offset    int64
    Key       []byte
    Value     []byte
    Headers   []Header
    Timestamp time.Time
}

type Header struct {
    Key   []byte
    Value []byte
}

Examples

Go to Examples.