Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsumerConf ¶
type ConsumerConf struct { NsResolver []string GroupName string Namespace string InstanceName string Strategy string RebalanceLockInterval int MaxReconsumeTimes int32 // 1 means 16 times ConsumerModel string // BroadCasting or Clustering or Unknown AutoCommit bool Resolver string AccessKey string SecretKey string }
ConsumerConf is the configuration of rocketmq consumer.
func (*ConsumerConf) MustNewPullConsumer ¶
func (c *ConsumerConf) MustNewPullConsumer() *rocketmq.PullConsumer
MustNewPullConsumer returns a pull consumer. If there are errors, it will exist.
func (*ConsumerConf) MustNewPushConsumer ¶
func (c *ConsumerConf) MustNewPushConsumer() *rocketmq.PushConsumer
MustNewPushConsumer returns a push consumer. If there are errors, it will exist.
func (*ConsumerConf) Validate ¶
func (c *ConsumerConf) Validate() error
Validate validates configurations.
type ProducerConf ¶
type ProducerConf struct { NsResolver []string // resolver address e.g. 127.0.0.1:9876 GroupName string `json:",optional"` Namespace string `json:",optional"` InstanceName string `json:",optional"` MsgTimeOut int `json:",optional"` DefaultTopicQueueNums int `json:",optional"` CreateTopicKey string `json:",optional"` CompressMsgBodyOverHowMuch int `json:",optional"` CompressLevel int `json:",optional"` Retry int `json:",optional"` AccessKey string `json:",optional"` SecretKey string `json:",optional"` }
ProducerConf is the configuration of rocketmq producer.
func (*ProducerConf) MustNewProducer ¶
func (c *ProducerConf) MustNewProducer() *rocketmq.Producer
MustNewProducer returns a producer. If there are errors, it will exist.
func (*ProducerConf) Validate ¶
func (c *ProducerConf) Validate() error
Validate the configuration If the configuration is not set, change it into default
Click to show internal directories.
Click to hide internal directories.