Versions in this module Expand all Collapse all v1 v1.0.1 Nov 6, 2020 Changes in this version + func InitKafkaConsumer() + func SetConsumerOption(cfg *model.KafkaConsumerConfig, opts *ConsumerOptions) error + func SetReturnTopicOption(tag string, opts *ConsumerOptions) error + type ConsumerOptions struct + BrokerAddresses []string + Cfg *sarama.Config + GroupID string + Topics []string + Version string + func NewConsumerOptions() *ConsumerOptions + type IHandler interface + HandleMessage func(message *sarama.ConsumerMessage) error + type SimConsumerGroup struct + func NewSimConsumerGroup(opts *ConsumerOptions) *SimConsumerGroup + func (scg *SimConsumerGroup) Cleanup(s sarama.ConsumerGroupSession) error + func (scg *SimConsumerGroup) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error + func (scg *SimConsumerGroup) DealErrors() + func (scg *SimConsumerGroup) HandleLoop() + func (scg *SimConsumerGroup) SetHandler(handler IHandler) + func (scg *SimConsumerGroup) Setup(s sarama.ConsumerGroupSession) error + func (scg *SimConsumerGroup) Start() error + func (scg *SimConsumerGroup) Stop()