producer

package
v0.0.0-...-2d91a92 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KafkaSyncProducer

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

func NewKafkaSyncProducer

func NewKafkaSyncProducer(ctx context.Context, brokers string) (*KafkaSyncProducer, error)

func (*KafkaSyncProducer) Close

func (ksProducer *KafkaSyncProducer) Close() error

func (*KafkaSyncProducer) GetBuffer

func (ksProducer *KafkaSyncProducer) GetBuffer() chan []string

This buffer can be used for consumer to put retry/dead letter/result message.

func (*KafkaSyncProducer) ProduceKafkaMessage

func (ksProducer *KafkaSyncProducer) ProduceKafkaMessage(topic, key, val string) error

message protocol: [topic type][retry count][reqID][req]

func (*KafkaSyncProducer) ProduceKafkaMessages

func (ksProducer *KafkaSyncProducer) ProduceKafkaMessages(topics, keys, vals []string) (int, error)

func (*KafkaSyncProducer) Producer

func (ksProducer *KafkaSyncProducer) Producer(ctx context.Context)

Jump to

Keyboard shortcuts

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