ps_kafka

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunConsumer

func RunConsumer(
	ctx, drainingCtx context.Context,
	brokers []string,
	topic, group string,
	handle func(context.Context, *kgo.Record) error,
) error

RunConsumer processes up to 50 records concurrently. Handlers may finish out of order, but commits stay ordered within each partition and stop at failures. On failure the client closes and uncommitted records are retried on the next run. Draining stops polling and lets the current batch finish before closing.

Types

type Publisher

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

func NewPublisher

func NewPublisher(brokers ...string) (*Publisher, error)

func (*Publisher) Close

func (p *Publisher) Close()

func (*Publisher) Ping

func (p *Publisher) Ping(ctx context.Context) error

func (*Publisher) Publish

func (p *Publisher) Publish(ctx context.Context, message ps_event.OutboxMessage) error

Jump to

Keyboard shortcuts

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