confluent

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BootstrapServers string
	GroupId          string
	AutoOffsetReset  string
}

type Consumer

type Consumer struct {
	*kafka.Consumer
	Conf ConsumerConfig
}

func (*Consumer) Close

func (c *Consumer) Close() error

Close closes the Confluent Kafka consumer.

func (*Consumer) Config

func (c *Consumer) Config() any

Config initializes an empty ConsumerConfig map and returns it for injection.

func (*Consumer) Init

func (c *Consumer) Init() error

Init creates the Confluent Kafka consumer and stores it.

type ConsumerConfig

type ConsumerConfig kafka.ConfigMap

func (ConsumerConfig) AfterInject

func (c ConsumerConfig) AfterInject()

AfterInject is a no-op satisfying the Config interface.

func (ConsumerConfig) BeforeInject

func (c ConsumerConfig) BeforeInject()

BeforeInject normalizes underscore-keyed config entries to dot notation (confluent-kafka-go convention).

func (ConsumerConfig) Build

func (c ConsumerConfig) Build() (*kafka.Consumer, error)

Build creates a Confluent Kafka consumer from this config map.

type Producer

type Producer struct {
	*kafka.Producer
	Conf ProducerConfig
}

func (*Producer) Close

func (p *Producer) Close() error

Close closes the Confluent Kafka producer and waits for in-flight messages.

func (*Producer) Config

func (p *Producer) Config() any

Config initializes an empty ProducerConfig map and returns it for injection.

func (*Producer) Init

func (p *Producer) Init() error

Init creates the Confluent Kafka producer and stores it.

type ProducerConfig

type ProducerConfig kafka.ConfigMap

func (ProducerConfig) AfterInject

func (c ProducerConfig) AfterInject()

AfterInject is a no-op satisfying the Config interface.

func (ProducerConfig) BeforeInject

func (c ProducerConfig) BeforeInject()

BeforeInject normalizes underscore-keyed config entries to dot notation.

func (ProducerConfig) Build

func (c ProducerConfig) Build() (*kafka.Producer, error)

Build creates a Confluent Kafka producer from this config map.

Jump to

Keyboard shortcuts

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