kafkaClient

package module
v0.0.0-...-4e4a002 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartTopicReader

func StartTopicReader(ctx context.Context, messageChannel chan string, errorChannel chan error, brokerURLs []string, inbound string, groupID string)

StartTopicReader Connects to kafka topic and reads new messages and writes them to the messageChannel any errors will be sent to errorChannel

Types

type Writer

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

func GetWriter

func GetWriter(kafkaURI string, topic string) Writer

GetWriter creates a kafka.Writer and wraps in a Writer stucture

func (Writer) SendMessage

func (writer Writer) SendMessage(message []byte) error

SendMessage constructs a kafkaMessage from message and writes to the topic the writer is attached to

Jump to

Keyboard shortcuts

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