aws_msk_helper

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 6 Imported by: 2

README

aws-msk-helper-go

AWS MSK helper for Go use kafka-go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKafkaReader

func NewKafkaReader(opts *NewKafkaReaderOptions) (*kafka.Reader, error)

func NewKafkaWriter

func NewKafkaWriter(opts *NewKafkaWriterOptions) (*kafka.Writer, error)

func Subscribe

func Subscribe(ctx context.Context, opts *NewKafkaReaderOptions, handler func(message kafka.Message)) error

func WriteMessage

func WriteMessage(ctx context.Context, writer *kafka.Writer, key []byte, value []byte, topic string, partition *int) error

Types

type NewKafkaReaderOptions

type NewKafkaReaderOptions struct {
	Brokers     []string
	GroupTopics []string
	Topic       string
	GroupID     string
	Partition   int
	Username    string
	Password    string
}

type NewKafkaWriterOptions

type NewKafkaWriterOptions struct {
	Brokers      []string
	Topic        string        // optional
	BatchSize    int           // optional
	BatchTimeout time.Duration // optional
	Username     string
	Password     string
}

Jump to

Keyboard shortcuts

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