redpanda

package
v1.8.22 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: MIT Imports: 10 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(kafkaBrokers, subscribeRegexes []string, groupId, instanceId string) (*Consumer, error)

func (*Consumer) GetMessage

func (c *Consumer) GetMessage() *shared.KafkaMessage

GetMessage returns the next message from the consumer.

func (*Consumer) GetMessages

func (c *Consumer) GetMessages() <-chan *shared.KafkaMessage

GetMessages returns the channel of messages from the consumer.

func (*Consumer) GetStats

func (c *Consumer) GetStats() (uint64, uint64)

GetStats returns consumed message counts.

func (*Consumer) GetTopics

func (c *Consumer) GetTopics() []string

GetTopics returns the topics that the consumer is subscribed to.

func (*Consumer) IsReady added in v1.8.10

func (c *Consumer) IsReady() bool

IsReady returns whether the consumer is ready to consume messages.

func (*Consumer) MarkMessage

func (c *Consumer) MarkMessage(message *shared.KafkaMessage)

MarkMessage marks a message as processed.

func (*Consumer) MarkMessages

func (c *Consumer) MarkMessages(messages []*shared.KafkaMessage)

MarkMessages marks a slice of messages as processed.

type ConsumerGroupHandler added in v1.8.9

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

ConsumerGroupHandler represents a Sarama consumer group consumer

func (*ConsumerGroupHandler) Cleanup added in v1.8.9

Cleanup is run at the end of a session, once all ConsumeClaim goroutines have exited

func (*ConsumerGroupHandler) ConsumeClaim added in v1.8.9

ConsumeClaim must start a consumer loop of ConsumerGroupClaim's Messages(). Once the Messages() channel is closed, the Handler must finish its processing loop and exit.

func (*ConsumerGroupHandler) Setup added in v1.8.9

Setup is run at the beginning of a new session, before ConsumeClaim

Jump to

Keyboard shortcuts

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