kafka

package
v0.0.0-...-15e17f2 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TheProducerFactory

func TheProducerFactory(brokers []string, config *sarama.Config) (sarama.SyncProducer, sarama.AsyncProducer, error)

Types

type Producer

type Producer struct {
	// contains filtered or unexported fields
}

func NewProducer

func NewProducer(brokers []string, conf *sarama.Config, factory ProducerFactory) (*Producer, error)

func (*Producer) Close

func (p *Producer) Close() error

func (*Producer) SendMessageAsync

func (p *Producer) SendMessageAsync(topic string, key string, value string)

func (*Producer) SendMessageSync

func (p *Producer) SendMessageSync(topic string, key string, value string) (partition int32, offset int64, err error)

type ProducerFactory

type ProducerFactory func(brokers []string, conf *sarama.Config) (sarama.SyncProducer, sarama.AsyncProducer, error)

Jump to

Keyboard shortcuts

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