Documentation ¶
Index ¶
- type ConsumerGroup
- func (consumer *ConsumerGroup) Cleanup(sarama.ConsumerGroupSession) error
- func (consumer *ConsumerGroup) Close()
- func (consumer *ConsumerGroup) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error
- func (consumer *ConsumerGroup) Setup(sarama.ConsumerGroupSession) error
- func (consumer *ConsumerGroup) Start()
- func (consumer *ConsumerGroup) StartWithDeadline(time time.Time)
- func (consumer *ConsumerGroup) StartWithTimeOut(timeout time.Duration)
- type ConsumerGroupOptions
- type IConsumerMsg
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsumerGroup ¶
type ConsumerGroup struct {
// contains filtered or unexported fields
}
Consumer represents a Sarama consumer group consumer
func NewConsumerGroup ¶
func NewConsumerGroup(name string, msg IConsumerMsg, authOpts []auth.Option, options ...Option) (consumer *ConsumerGroup, err error)
user just defined open consumer group option
func (*ConsumerGroup) Cleanup ¶
func (consumer *ConsumerGroup) Cleanup(sarama.ConsumerGroupSession) error
Cleanup is run at the end of a session, once all ConsumeClaim goroutines have exited
func (*ConsumerGroup) Close ¶
func (consumer *ConsumerGroup) Close()
func (*ConsumerGroup) ConsumeClaim ¶
func (consumer *ConsumerGroup) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error
ConsumeClaim must start a consumer loop of ConsumerGroupClaim's Messages().
func (*ConsumerGroup) Setup ¶
func (consumer *ConsumerGroup) Setup(sarama.ConsumerGroupSession) error
Setup is run at the beginning of a new session, before ConsumeClaim
func (*ConsumerGroup) Start ¶
func (consumer *ConsumerGroup) Start()
func (*ConsumerGroup) StartWithDeadline ¶
func (consumer *ConsumerGroup) StartWithDeadline(time time.Time)
func (*ConsumerGroup) StartWithTimeOut ¶
func (consumer *ConsumerGroup) StartWithTimeOut(timeout time.Duration)
type ConsumerGroupOptions ¶
type ConsumerGroupOptions struct { *auth.AuthOptions // contains filtered or unexported fields }
type IConsumerMsg ¶
type IConsumerMsg interface {
Consumer(msg *sarama.ConsumerMessage) error
}
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithInitialOffset ¶
initial offset to consumer (oldest, newest)
func WithReBalanceStrategy ¶
consumer group partition assignment strategy (range, roundrobin, sticky)
Click to show internal directories.
Click to hide internal directories.