Versions in this module Expand all Collapse all v1 v1.0.0 Aug 20, 2024 Changes in this version + type ASyncProducer struct + func (kafkaProducer *ASyncProducer) Close() + type ConsumerHandler interface + CleanUpHook func() + HandleMsg func(msg *sarama.ConsumerMessage) error + SetupHook func() + type ConsumerSetting struct + AutoCommit bool + ErrorCallback func(err error) + GroupId string + Hosts []string + MaxRetry int + MaxRetryHandleMsg int + Name string + Offset int64 + ReturnError bool + Topic string + type GroupConsumer struct + func NewConsumer(setting ConsumerSetting) (*GroupConsumer, error) + func (consumer *GroupConsumer) Close() + func (consumer *GroupConsumer) StartGroupConsume(handler ConsumerHandler) error + type ProducerInterface interface + Close func() + SendMsg func(topic string, key string, value string) error + type ProducerSetting struct + ErrorCallback func(err error) + Hosts []string + MaxMessageBytes int + MaxRetry int + Name string + RequiredAcks int + ReturnError bool + ReturnSuccess bool + Timeout time.Duration + Topic string + type SyncProducer struct + func NewSyncProducer(producerSetting ProducerSetting) (*SyncProducer, error) + func (kafkaProducer *SyncProducer) Close() + func (kafkaProducer *SyncProducer) SendMsg(topic string, key string, value string) (err error)