Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AsyncProducer ¶
AsyncProducer kafka client to async produce message
func MustNewAsyncProducer ¶
func MustNewAsyncProducer(topic string, brokerAddr []string) AsyncProducer
MustNewAsyncProducer constructor
type HandleFunc ¶
HandleFunc receive kafka message ,return result
type KfkStreamConsumer ¶
type KfkStreamConsumer interface { // start to async fetch the messages . // when the amount of received message is up to the config num, // the caller can get the slice of subscribe messages Subscribe(ctx context.Context, handle HandleFunc) chan interface{} // Commit the continuously outputted messages' offset Commit() error // stop fetching message Close() error }
KfkStreamConsumer aim to accelerate process speed per consumer
func MustNewKfkStreamConsumer ¶
func MustNewKfkStreamConsumer(topic, group string, workerNum int, brokers []string) KfkStreamConsumer
MustNewKfkStreamConsumer constructor of KfkStreamConsumer
Click to show internal directories.
Click to hide internal directories.