kafka

package
v0.0.0-...-1593278 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Producer *kafka.Producer

Functions

func DeserializeKafkaID

func DeserializeKafkaID(messageID []byte) int64

func NewKafkaClientInstance

func NewKafkaClientInstance(address string) *kafkaClient

func NewKafkaClientInstanceWithConfig

func NewKafkaClientInstanceWithConfig(config *paramtable.KafkaConfig) *kafkaClient

func NewKafkaClientInstanceWithConfigMap

func NewKafkaClientInstanceWithConfigMap(config kafka.ConfigMap, extraConsumerConfig kafka.ConfigMap, extraProducerConfig kafka.ConfigMap) *kafkaClient

func SerializeKafkaID

func SerializeKafkaID(messageID int64) []byte

Types

type Consumer

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

func (*Consumer) Ack

func (kc *Consumer) Ack(message mqwrapper.Message)

func (*Consumer) Chan

func (kc *Consumer) Chan() <-chan mqwrapper.Message

Chan provides a channel to read consumed message. confluent-kafka-go recommend us to use function-based consumer, channel-based consumer API had already deprecated, see more details https://github.com/confluentinc/confluent-kafka-go.

func (*Consumer) CheckTopicValid

func (kc *Consumer) CheckTopicValid(topic string) error

func (*Consumer) Close

func (kc *Consumer) Close()

func (*Consumer) GetLatestMsgID

func (kc *Consumer) GetLatestMsgID() (mqwrapper.MessageID, error)

func (*Consumer) Seek

func (kc *Consumer) Seek(id mqwrapper.MessageID, inclusive bool) error

func (*Consumer) Subscription

func (kc *Consumer) Subscription() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳