kafka

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package kafka provides a Kafka implementation of the MessageQueueReader interface. It allows reading messages from Apache Kafka topics without committing offsets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KafkaReader

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

KafkaReader implements MessageQueueReader for Apache Kafka

func NewKafkaReader

func NewKafkaReader(cfg *mqreader.Config) (*KafkaReader, error)

NewKafkaReader creates a new Kafka reader from a config

func (*KafkaReader) Close

func (r *KafkaReader) Close() error

Close releases resources

func (*KafkaReader) Connect

func (r *KafkaReader) Connect(ctx context.Context) error

Connect establishes connection to Kafka

func (*KafkaReader) GetMetadata

func (r *KafkaReader) GetMetadata(ctx context.Context) (*mqreader.QueueMetadata, error)

GetMetadata returns information about the topic

func (*KafkaReader) Peek

func (r *KafkaReader) Peek(ctx context.Context, maxMessages int) ([]mqreader.Message, error)

Peek reads messages without consuming them (no offset commits)

Jump to

Keyboard shortcuts

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