Back to

Package kafkaclient

Latest Go to latest

The highest tagged major version is .

Published: May 8, 2019 | License: MIT | Module:


type Client

type Client interface {
	// NewConsumer returns a new instance of kafka consumer.
	NewConsumer(config *kafka.ConsumerConfig, consumerOpts ...ConsumerOption) (kafka.Consumer, error)

Client refers to the kafka client. Serves as the entry point to producing or consuming messages from kafka

func New

func New(resolver kafka.NameResolver, logger *zap.Logger, scope tally.Scope) Client

New returns a new kafka client.

type ConsumerOption

type ConsumerOption interface {
	// contains filtered or unexported methods

ConsumerOption is the type for optional arguments to the NewConsumer constructor.

func WithClientID

func WithClientID(clientID string) ConsumerOption

WithClientID sets client id.

func WithDLQTopics

func WithDLQTopics(topicList kafka.ConsumerTopicList) ConsumerOption

WithDLQTopics creates a range consumer for the specified consumer DLQ topics.

func WithRetryTopics

func WithRetryTopics(topicList kafka.ConsumerTopicList) ConsumerOption

WithRetryTopics creates a consumer for the specified consumer Retry topics.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier