Documentation ¶
Index ¶
- Variables
- func Close()
- func NewConsumerConfig(brokers []string, groupID string, topic string) kafka.ReaderConfig
- func NewProducerConfig(brokers []string) *kafka.Writer
- func NewVipConsumerConfig(brokername string, groupID string, topic string) kafka.ReaderConfig
- func NewVipProducerConfig(configName string) *kafka.Writer
- type Consumer
- type Producer
Constants ¶
This section is empty.
Variables ¶
View Source
var ProducerPool sync.Map
Functions ¶
func NewConsumerConfig ¶
func NewProducerConfig ¶
func NewProducerConfig(brokers []string) *kafka.Writer
NewProducerConfig 该方法返回值不能复用,每次NewProducer时都需要调用一次
func NewVipConsumerConfig ¶
func NewVipProducerConfig ¶
func NewVipProducerConfig(configName string) *kafka.Writer
NewVipProducerConfig 该方法返回值不能复用,每次NewProducer时都需要调用一次
Types ¶
type Consumer ¶
type Consumer struct { Reader *kafka.Reader // contains filtered or unexported fields }
type Producer ¶
type Producer struct { Writer *kafka.Writer // contains filtered or unexported fields }
func GetProducer ¶
func NewProducer ¶
NewProducer conf每次重新生成
Click to show internal directories.
Click to hide internal directories.