Versions in this module Expand all Collapse all v1 v1.0.0 Oct 28, 2024 Changes in this version + func Exit() + func Init(cfg *Config, log mq.Logger, redis Redis, queueName string, removeCert bool) error + func Publish(topic string, header map[string]string, msg []byte, opts ...mq.PublishOption) error + func Subscribe(group string, h Handler, topics []string) error + func SubscribeWithStrategyOfRetry(group string, h Handler, topics []string, retryNum int) error + func SubscribeWithStrategyOfSendBack(group string, h Handler, topics []string) error + type Config struct + Address string + Algorithm string + MQCert string + OTEL bool + Password string + SkipCertVerify bool + Username string + Version string + func (cfg *Config) Validate() error + type Handler func([]byte, map[string]string) error + type Redis interface + IsKeyNotExists func(error) bool + LPop func(string, interface{}) error + RPush func(string, interface{}) error