kafka

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConsumerFactory added in v0.4.3

func NewConsumerFactory(cfg *config.ProviderConfig) (queue.MessageQueueConsumer, error)

NewConsumerFactory returns a new RabbitMQ consumer based on the provided configuration.

Types

type Consumer

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

Consumer is the implementation of the MessageQueueConsumer interface for Kafka

func NewConsumer

func NewConsumer(cfg *config.KafkaConfig) *Consumer

NewConsumer creates a new Kafka consumer

func (*Consumer) Close

func (c *Consumer) Close() error

Close closes the connection to Kafka

func (*Consumer) Connect

func (c *Consumer) Connect() error

Connect creates a connection to Kafka

func (*Consumer) Consume

func (c *Consumer) Consume(queueName string, handler func(msg []byte) error) error

Consume consumes messages from Kafka

Jump to

Keyboard shortcuts

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