Documentation ¶
Index ¶
- type Consumer
- func (c *Consumer) Close() error
- func (c *Consumer) GetMessage() *shared.KafkaMessage
- func (c *Consumer) GetMessages() chan *shared.KafkaMessage
- func (c *Consumer) GetState() ConsumerState
- func (c *Consumer) GetStats() (uint64, uint64)
- func (c *Consumer) GetTopics() []string
- func (c *Consumer) IsRunning() bool
- func (c *Consumer) MarkMessage(msg *shared.KafkaMessage)
- func (c *Consumer) MarkMessages(msgs []*shared.KafkaMessage)
- func (c *Consumer) Start(ctx context.Context) error
- type ConsumerState
- type GroupHandler
- type TopicPartition
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
}
Consumer wraps sarama's ConsumerGroup.
func NewConsumer ¶
NewConsumer initializes a Consumer.
func (*Consumer) GetMessage ¶
func (c *Consumer) GetMessage() *shared.KafkaMessage
GetMessage receives a single message.
func (*Consumer) GetMessages ¶
func (c *Consumer) GetMessages() chan *shared.KafkaMessage
GetMessages returns the message channel.
func (*Consumer) GetState ¶
func (c *Consumer) GetState() ConsumerState
func (*Consumer) MarkMessage ¶
func (c *Consumer) MarkMessage(msg *shared.KafkaMessage)
MarkMessage marks a message for commit.
func (*Consumer) MarkMessages ¶
func (c *Consumer) MarkMessages(msgs []*shared.KafkaMessage)
MarkMessages marks multiple messages for commit.
type ConsumerState ¶
type ConsumerState int
const ( ConsumerStateUnknown ConsumerState = iota ConsumerStateEmpty ConsumerStateStable ConsumerStatePreparingRebalance ConsumerStateCompletingRebalance ConsumerStateDead )
type GroupHandler ¶
type GroupHandler struct {
// contains filtered or unexported fields
}
func (*GroupHandler) Cleanup ¶
func (c *GroupHandler) Cleanup(session sarama.ConsumerGroupSession) error
func (*GroupHandler) ConsumeClaim ¶
func (c *GroupHandler) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error
func (*GroupHandler) Setup ¶
func (c *GroupHandler) Setup(_ sarama.ConsumerGroupSession) error
type TopicPartition ¶
Click to show internal directories.
Click to hide internal directories.