Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MQMsgPool = &sync.Pool{ New: func() interface{} { return &pb.MQData{} }, } )
Functions ¶
Types ¶
type Consumer ¶
Consumer 消费者
func NewConsumerWithLog ¶
NewProducer creates kafka async producer
func (*Consumer) StartConsume ¶
func (c *Consumer) StartConsume()
type Producer ¶
type Producer struct { Producer sarama.AsyncProducer Topic string }
Producer represents the kafka async producer
func NewProducer ¶
NewProducer creates kafka async producer
func NewProducerWithLog ¶
func NewProducerWithLog(addrs []string, topic, clientID, logPath, userName, passWord string, enableAuth bool) (*Producer, error)
NewProducer creates kafka async producer
func (*Producer) SendJsonWithKey ¶
Send 发送
Click to show internal directories.
Click to hide internal directories.