tmq

package
v3.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

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

func NewConsumer

func NewConsumer(conf *tmq.ConfigMap) (*Consumer, error)

NewConsumer Create new TMQ consumer with TMQ config

func (*Consumer) Assignment added in v3.5.2

func (c *Consumer) Assignment() (partitions []tmq.TopicPartition, err error)

func (*Consumer) Close

func (c *Consumer) Close() error

Close release consumer

func (*Consumer) Commit

func (c *Consumer) Commit() ([]tmq.TopicPartition, error)

func (*Consumer) Poll

func (c *Consumer) Poll(timeoutMs int) tmq.Event

Poll consumer poll message with timeout

func (*Consumer) Seek added in v3.5.2

func (c *Consumer) Seek(partition tmq.TopicPartition, ignoredTimeoutMs int) error

func (*Consumer) Subscribe

func (c *Consumer) Subscribe(topic string, rebalanceCb RebalanceCb) error

func (*Consumer) SubscribeTopics

func (c *Consumer) SubscribeTopics(topics []string, rebalanceCb RebalanceCb) error

func (*Consumer) Unsubscribe

func (c *Consumer) Unsubscribe() error

Unsubscribe TMQ unsubscribe

type RebalanceCb

type RebalanceCb func(*Consumer, tmq.Event) error

Jump to

Keyboard shortcuts

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