kafka

package
v0.0.0-...-d5b0b98 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProducerRetryMax = 3
	ProducerTimeout  = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Kafka

type Kafka struct {
	// contains filtered or unexported fields
}

Kafka is a type of connector

func New

func New(brokerList []string) (*Kafka, error)

New creates a new Kafka producer

func (*Kafka) SendDelayMsg

func (s *Kafka) SendDelayMsg(ctx context.Context, topic string, orderingKey string, data []byte, delay time.Duration) error

SendDelayMsg Kafka Kafka does not support delayed messages

func (*Kafka) SendMsg

func (s *Kafka) SendMsg(ctx context.Context, topic string, orderingKey string, data []byte) error

SendMsg is the stores that send real-time events

func (*Kafka) Stop

func (s *Kafka) Stop() error

Stop stops the kafka connector gracefully.

Jump to

Keyboard shortcuts

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