confluent

package
v0.0.0-...-0909f30 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Channel to detect when the client is do with the process.
	Done = make(chan bool)
)

Functions

func Lag

func Lag(consumer *kafka.Consumer) int

Lag returns the LAG of certain consumer. If the consumer hasn't consumed any message and the consumer group id is new, the LAG would identify the number of messages available in that topic.

func NewConsumer

func NewConsumer(brokers string, poll bool) *kafka.Consumer

NewConsumer returns a new confluent consumer.

func NewProducer

func NewProducer(brokers string) *kafka.Producer

NewProducer returns a new confluent producer.

func Prepare

func Prepare(producer *kafka.Producer, message []byte, numMessages int) func()

Prepare returns a function that can be used during the benchmark as it only performs the sending of messages, checking that the sending was successful.

func PrepareChannel

func PrepareChannel(consumer *kafka.Consumer, numMessages int) func()

PrepareChannel returns a function that can be used during the benchmark as it only performs the consuming of messages. It uses the deprecated channel method.

func PreparePoll

func PreparePoll(consumer *kafka.Consumer, numMessages int) func()

PreparePoll returns a function that can be used during the benchmark as it only performs the consuming of messages. It uses the poll/function method.

Types

This section is empty.

Jump to

Keyboard shortcuts

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