kafka

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OffsetOldest int64 = -2
	OffsetLatest int64 = -1
)

Variables

This section is empty.

Functions

func NewMessageSink

func NewMessageSink(config MessageSinkConfig) (pubsub.MessageSink, error)

func NewMessageSource

func NewMessageSource(config MessageSourceConfig) pubsub.ConcurrentMessageSource

NewMessageSource provides a new kafka message source

Types

type MessageSinkConfig

type MessageSinkConfig struct {
	Topic           string
	Brokers         []string
	KeyFunc         func(pubsub.ProducerMessage) []byte
	MaxMessageBytes int
	Version         *sarama.KafkaVersion
}

type MessageSourceConfig

type MessageSourceConfig struct {
	ConsumerGroup            string
	Topic                    string
	Brokers                  []string
	Offset                   int64
	MetadataRefreshFrequency time.Duration
	OffsetsRetention         time.Duration
	Version                  *sarama.KafkaVersion
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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