Documentation ¶
Index ¶
Constants ¶
View Source
const ( ACK_BEFORE_AUTO = 0 ACK_AFTER_NOERROR = 1 ACK_AFTER_NOMATTER = 2 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Consumer ¶
type Consumer interface { Close() error Consume(topics string, mh ConsumerMessageHandler, eh ConsumerErrorHandler) error ConsumeM(topics []string, mh ConsumerMessageHandler, eh ConsumerErrorHandler) error }
func GetConsumer ¶
type ConsumerErrorHandler ¶
type ConsumerErrorHandler func(err error)
type ConsumerMessageHandler ¶
type ConsumerMessageHandler func(msg *sarama.ConsumerMessage) error
type Producer ¶
type Producer interface { Close() error Produce(msgs ...*sarama.ProducerMessage) error AsyncHandle(mh ProducerMessageHandler, eh ProducerErrorHandler) // 必须设置 asyncReturnSuccess 或 asyncReturnError }
func GetProducer ¶
type ProducerErrorHandler ¶
type ProducerErrorHandler func(err *sarama.ProducerError)
type ProducerMessageHandler ¶
type ProducerMessageHandler func(msg *sarama.ProducerMessage)
Click to show internal directories.
Click to hide internal directories.