Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ConsumerList sync.Map
View Source
var ProducerList sync.Map
Functions ¶
func GetProducer ¶
func GetPushConsumer ¶
func GetPushConsumer(name string) (consumer rocketmq.PushConsumer, err error)
Types ¶
type ConsumeFunc ¶
type ConsumeFunc struct {
MaxCount int // 最大16次
}
func NewConsumeFunc ¶
func NewConsumeFunc() ConsumeFunc
func (ConsumeFunc) Middleware ¶
func (c ConsumeFunc) Middleware(f func(msg *rocketmq.MessageExt) rocketmq.ConsumeStatus) func(msg *rocketmq.MessageExt) rocketmq.ConsumeStatus
最大重试次数,超过次数发邮件报警等功能可以直接扩展
type Consumer ¶
type Consumer struct { RocketConf RocketMQConfig ConsumerConfig *rocketmq.PushConsumerConfig }
func NewConsumer ¶
func (Consumer) SetConsumerModel ¶
func (c Consumer) SetConsumerModel(consumerModel rocketmq.ConsumerModel)
func (Consumer) SetMessageModel ¶
func (c Consumer) SetMessageModel(messageModel rocketmq.MessageModel)
type Producer ¶
type Producer struct { RocketConf RocketMQConfig ProducerConfig *rocketmq.ProducerConfig }
func NewProducer ¶
func (Producer) SetProducerModel ¶
func (p Producer) SetProducerModel(producerModel rocketmq.ProducerModel)
Click to show internal directories.
Click to hide internal directories.