kafka

package
v0.0.0-...-d09ac20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2019 License: Apache-2.0 Imports: 8 Imported by: 1

README

Kafka

1.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AsyncProducer sarama.AsyncProducer
View Source
var Consumer *cluster.Consumer
View Source
var KafkaCloseSign = false
View Source
var KafkaWait sync.WaitGroup
View Source
var MsgChan = make(chan string, 1000)
View Source
var StopChan = make(chan struct{})
View Source
var StopPublishChan = make(chan struct{})
View Source
var SyncProducer sarama.SyncProducer

Functions

func AsyncProduce

func AsyncProduce(log log.TLog)

异步发送

func AsyncPublishStart

func AsyncPublishStart()

func Consume

func Consume(consumer *cluster.Consumer)

func ConsumeStart

func ConsumeStart()

"github.com/Shopify/sarama"不支持consume group,故选择再次封装的"github.com/bsm/sarama-cluster"

func KafkaInit

func KafkaInit()

func SyncProduce

func SyncProduce(log log.TLog, message string)

同步发送

func SyncPublishStart

func SyncPublishStart()

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL