Documentation ¶
Index ¶
- type Consumer
- func (c *Consumer) GetMessage() *shared.KafkaMessage
- func (c *Consumer) GetMessages() <-chan *shared.KafkaMessage
- func (c *Consumer) GetStats() (uint64, uint64)
- func (c *Consumer) GetTopics() []string
- func (c *Consumer) IsReady() bool
- func (c *Consumer) MarkMessage(message *shared.KafkaMessage)
- func (c *Consumer) MarkMessages(messages []*shared.KafkaMessage)
- type ConsumerGroupHandler
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 (*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) IsReady ¶ added in v1.8.10
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
func (c *ConsumerGroupHandler) Cleanup(session sarama.ConsumerGroupSession) error
Cleanup is run at the end of a session, once all ConsumeClaim goroutines have exited
func (*ConsumerGroupHandler) ConsumeClaim ¶ added in v1.8.9
func (c *ConsumerGroupHandler) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error
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
func (c *ConsumerGroupHandler) Setup(session sarama.ConsumerGroupSession) error
Setup is run at the beginning of a new session, before ConsumeClaim