kafka

package
v1.6.5 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKafkaAsyncProducer

func NewKafkaAsyncProducer(urls string, returnValue bool) (*producer, error)

NewKafkaAsyncProducer 创建一个新的异步 kafka Producer 实例, returnValue 设置是否启用异步处理状态通知和错误消息状态通知, 如果 returnValue 为 true,则必须调用 LogHandler 接口以及实现内部的处理函数 func(msgType string, data interface{})

func NewKafkaConsumer

func NewKafkaConsumer(url string, topic string) (*consumer, error)

NewKafkaConsumer 创建新的 kafka Consumer 实例

func NewKafkaSyncProducer

func NewKafkaSyncProducer(urls string) (*producer, error)

NewKafkaSyncProducer 创建一个新的 kafka Producer 实例, 同步实例的 Return.Successes 和 Return.Errors 参数必须为 true, 这也是默认值

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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