kafka

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package kafka allows to process messages from a kafka topic ensuring at-least-once semantics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AloProcessor

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

An AloProcessor allows to process messages from a kafka topic ensuring at-least-once semantics.

func NewAloProcessor

func NewAloProcessor(config map[string]any) (AloProcessor, error)

NewAloProcessor returns an AloProcessor with the provided kafka configuration properties.

func (AloProcessor) Close

func (proc AloProcessor) Close() error

Close closes the underlaying kafka consumer.

func (AloProcessor) Process

func (proc AloProcessor) Process(ctx context.Context, entity string, h stream.MsgHandler) error

Process processes the messages received in the topic called entity by calling h. This method blocks the calling goroutine until the specified context is cancelled or an error occurs. It replaces the current kafka subscription, so it should not be called concurrently.

Jump to

Keyboard shortcuts

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