kafka

package
v0.0.0-...-ff71292 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Producer

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

func NewProducer

func NewProducer(kafkaBrokers []string, inputTopic string, config *sarama.Config) *Producer

NewProducer populate and returns a *Producer struct.

func (*Producer) SendConfigMessages

func (producer *Producer) SendConfigMessages()

SendConfigMessages send one message to all partitions of input topic when the application starts. This method have 15 seconds of timeSleep to wait entire processor run and them, send the configuration messages.

type SaramaConfig

type SaramaConfig struct {
	ApplicationName string
}

func Config

func Config(applicationName string) *SaramaConfig

Config populate and returns a *SaramaConfig struct.

func (*SaramaConfig) Sarama

func (config *SaramaConfig) Sarama() *sarama.Config

Sarama method serves to set the configs, like authentication, producers, consumers, etc...

Jump to

Keyboard shortcuts

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