tmq

package
v3.25.6 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 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

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) CommitOffsets

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

func (*Consumer) Committed

func (c *Consumer) Committed(partitions []tmq.TopicPartition, timeoutMs int) (offsets []tmq.TopicPartition, err error)

func (*Consumer) Poll

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

Poll consumer poll message with timeout

func (*Consumer) Position

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

func (*Consumer) Seek

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