kafka

package
v0.0.0-...-0871eb3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Consumer

func Consumer(c sarama.Consumer, topic string, ch ChReceive)

Consumer is to start consumer

func ConsumerOnMultiplePartitions

func ConsumerOnMultiplePartitions(c sarama.Consumer, topic string) error

ConsumerOnMultiplePartitions is is to start consumer in multiple partitions TODO: Work in progress. Not checked yet.

func CreateConsumer

func CreateConsumer(host string, port int) (sarama.Consumer, error)

CreateConsumer is to create consumer

func CreateMsg

func CreateMsg(topic, key, val string) *sarama.ProducerMessage

CreateMsg is to create message on topic

func CreateProducer

func CreateProducer(host string, port int) (sarama.SyncProducer, error)

CreateProducer is to create producer

func Producer

func Producer(producer sarama.SyncProducer, msg *sarama.ProducerMessage) error

Producer is to send message

Types

type ChReceive

type ChReceive struct {
	ChWait chan bool
	ChCMsg chan *sarama.ConsumerMessage
}

ChReceive is struct of channel for receiver

Jump to

Keyboard shortcuts

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