kafka

package
v0.0.0-...-ddc95ab Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseConsumer

func CloseConsumer(service ConsumerService)

func CloseProducer

func CloseProducer(service ProducerService)

func SendMessageToRecommender

func SendMessageToRecommender(service ProducerService, event any, topic string) error

func StartEventsConsumer

func StartEventsConsumer(ctx context.Context, service ConsumerService, topic string, OnEvent func(p int32, pc sarama.PartitionConsumer)) error

StartEventsConsumer starts a simple Kafka consumer that listens to the given topic

Types

type ConsumerService

type ConsumerService interface {
	GetConsumer() sarama.Consumer
}

type ProducerService

type ProducerService interface {
	GetProducer() sarama.AsyncProducer
}

Jump to

Keyboard shortcuts

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