Versions in this module Expand all Collapse all v0 v0.0.1 Sep 6, 2021 Changes in this version + type HandCommitConsumer struct + HandleMsg func(msg *sarama.ConsumerMessage) bool + func (consumer *HandCommitConsumer) Cleanup(sarama.ConsumerGroupSession) error + func (consumer *HandCommitConsumer) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error + func (consumer *HandCommitConsumer) Setup(sarama.ConsumerGroupSession) error + type KafkaMessageQueueConsumer struct + ConsumerGroup sarama.ConsumerGroup + Ctx context.Context + func NewDefaultKafkaMessageQueueConsumer(brokers []string, groupName string, autoCommit bool, ctx context.Context) (*KafkaMessageQueueConsumer, error) + func (c *KafkaMessageQueueConsumer) Close() error + func (c *KafkaMessageQueueConsumer) ConsumeWithHandCommit(topics []string, handleMsg func(msg *sarama.ConsumerMessage) bool) + type KafkaMessageQueueProducer struct + ReqTryCfg RetryConfig + SyncProducer *sarama.SyncProducer + func NewDefaultKafkaMessageQueueProducer(brokersAddress []string, reqTryCfg RetryConfig) (*KafkaMessageQueueProducer, error) + func (k *KafkaMessageQueueProducer) Close() + func (k *KafkaMessageQueueProducer) CloseKafkaProducer() + func (k *KafkaMessageQueueProducer) SendJsonMessage(topic string, jsonByte []byte) error + func (k *KafkaMessageQueueProducer) SendJsonMessages(topic string, jsonBytes ...[]byte) error + type RetryConfig struct + DelayTime time.Duration + RetryTime int