kafka

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetEndOffsets(topic string, partitions []int) ([]kafka.PartitionOffsets, error)
	GetPartitions(topic string) ([]int, error)
	CreateCompactedTopic(topic string, partition int, replicationFactor int) error
	Producer() *kafka.Writer
	Consumer(topic string, partition int, startOffset int64) *kafka.Reader
	CheckTopicIsCompacted(topic string) error
	CheckTopics(topics []string) error
}

func NewClient

func NewClient(config *config.Connector) Client

type RejectionLog added in v1.2.0

type RejectionLog struct {
	Topic string
	Value string
	Error string
	Key   []byte
}

type RejectionLogSinkResponseHandler added in v1.2.0

type RejectionLogSinkResponseHandler struct {
	KafkaClient Client
	Writer      *kafka.Writer
	Topic       string
	Config      config.Kafka
}

func (*RejectionLogSinkResponseHandler) OnError added in v1.2.0

func (*RejectionLogSinkResponseHandler) OnInit added in v1.2.0

func (*RejectionLogSinkResponseHandler) OnSuccess added in v1.2.0

type SinkResponseHandler added in v1.1.22

type SinkResponseHandler interface {
	OnSuccess(ctx *SinkResponseHandlerContext)
	OnError(ctx *SinkResponseHandlerContext)
	OnInit(ctx *SinkResponseHandlerInitContext)
}

func NewRejectionLogSinkResponseHandler added in v1.2.0

func NewRejectionLogSinkResponseHandler() SinkResponseHandler

type SinkResponseHandlerContext added in v1.1.22

type SinkResponseHandlerContext struct {
	Message *message.KafkaMessage
	Err     error
}

type SinkResponseHandlerInitContext added in v1.2.0

type SinkResponseHandlerInitContext struct {
	KafkaClient Client
	Writer      *kafka.Writer
	Config      config.Kafka
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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