kafka

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SaramaCachedClient

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

SaramaCachedClient wraps a sarama kafka client, exposing common used methods at sources and targets.

If a method fails it will try to re-connect and try again before failing.

func NewSaramaCachedClient

func NewSaramaCachedClient(ctx context.Context, bootstrapServers []string, cfg *sarama.Config, logger *zap.Logger, opts ...SaramaCachedClientOption) (*SaramaCachedClient, error)

func (*SaramaCachedClient) Close

func (sc *SaramaCachedClient) Close() error

func (*SaramaCachedClient) EnsureTopic

func (sc *SaramaCachedClient) EnsureTopic(topic string, replicas int16, partitions int32) error

func (*SaramaCachedClient) PingTopic

func (sc *SaramaCachedClient) PingTopic(topic string) error

func (*SaramaCachedClient) RefreshProducerClients

func (sc *SaramaCachedClient) RefreshProducerClients() error

func (*SaramaCachedClient) SendMessageSync

func (sc *SaramaCachedClient) SendMessageSync(message *sarama.ProducerMessage) error

type SaramaCachedClientOption

type SaramaCachedClientOption func(*SaramaCachedClient)

func WithSaramaCachedClientRefresh

func WithSaramaCachedClientRefresh(d time.Duration) SaramaCachedClientOption

Jump to

Keyboard shortcuts

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