Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializeConsumer ¶
func InitializeConsumer(config *RmqConfig, consumerConfig *ConsumerConfig)
func SetRLogLevelToError ¶ added in v0.0.30
func SetRLogLevelToError()
Types ¶
type ConsumerConfig ¶
type ConsumerConfig struct { Topic string Tag string Group string // consumer group Order bool // fifo message ConsumerMode ConsumerMode MsgHandler func(ctx context.Context, msgs ...*primitive.MessageExt) (consumer.ConsumeResult, error) }
type ConsumerMode ¶
type ConsumerMode int
const ( SingleMode ConsumerMode = iota // 同樣group中的的consumer 只會有一個consumer收到訊息 PubSubMode // pub/sub mode 用於水平擴展 group 中的所有consumer 都會收到同一條消息 )
Click to show internal directories.
Click to hide internal directories.