Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetMaxRetryTimes ¶
func SetMaxRetryTimes(tm int)
SetMaxRetryTimes set the retry times if producer connection is break
Types ¶
type INSQProducer ¶
type INSQProducer interface { Stop() Publish(topic string, body []byte) error SetLogger(l logger, lvl nsq.LogLevel) }
INSQProducer is an interface to export
func NewNSQProducer ¶
func NewNSQProducer(nsqlookupdAddrs []string, config *nsq.Config, l logger, loglvl nsq.LogLevel) (INSQProducer, error)
NewNSQProducer return a NSQProducer instance
@param1 nsqlookupAddr
Click to show internal directories.
Click to hide internal directories.