Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializeConsumer ¶
func InitializeConsumer(config *RmqConfig, consumerConfig *ConsumerConfig, opts ...consumer.Option)
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
ConsumeConcurrentlyMaxSpan int // default 1000
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 都會收到同一條消息 )
type Rmq ¶
func InitializePublisher ¶
func InitializeQueuePublisher ¶ added in v0.0.59
func (*Rmq) SendOneWay ¶ added in v0.0.51
Click to show internal directories.
Click to hide internal directories.