kafka

package
v0.0.0-...-0091320 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeliveryReport

func DeliveryReport(deliveryChan chan ckafka.Event)

DeliveryReport monitories a channel kafka

func NewKafkaProducer

func NewKafkaProducer() *ckafka.Producer

NewKafkaProducer creates a new kafka producer

func Publish

func Publish(msg string, topic string, producer *ckafka.Producer, deliveryChan chan ckafka.Event) error

Publish publishes a message to a topic

Types

type KafkaProcessor

type KafkaProcessor struct {
	Database     *gorm.DB
	Producer     *ckafka.Producer
	DeliveryChan chan ckafka.Event
}

KafkaProcessor represents a processor for kafka messages

func NewKafkaProcessor

func NewKafkaProcessor(database *gorm.DB, producer *ckafka.Producer, deliveryChan chan ckafka.Event) *KafkaProcessor

NewKafkaProcessor creates a new processor for kafka messages

func (*KafkaProcessor) Consume

func (processor *KafkaProcessor) Consume()

Consume consumes messages

Jump to

Keyboard shortcuts

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