kafka

package
v0.0.0-...-841f565 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const RetryCountKey = "X-Retry-Count"
View Source
const RetryDelayKey = "X-Retry-Delay"

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

type Broker struct {
	Producer       *kafka.Producer
	Consumer       *kafka.Consumer
	PublishTimeout *time.Duration
	Logger         logz.FieldLogger
}

func (Broker) Close

func (b Broker) Close() error

func (Broker) Publish

func (b Broker) Publish(topic cqrs.RouteKey, messages ...cqrs.Message) error

func (Broker) Subscribe

func (b Broker) Subscribe(ctx context.Context, topic cqrs.RouteKey, ackDeadline *time.Duration) (<-chan cqrs.Envelope, error)

Jump to

Keyboard shortcuts

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