statelessretry

package
v0.0.0-...-cd65121 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsumeWithRetry

func ConsumeWithRetry(ctx context.Context, option *ConsumerWithRetryOption)

Types

type ConsumerWithRetryOption

type ConsumerWithRetryOption struct {
	Handler       Handler
	Consumer      *kafka.Consumer
	RetryQueue    chan *kafka.Message // make sure you passed buffered channel to get concurrent retries otherwies new messages will wait unitl previous retries are finished
	MaxRetryCount int
	Backoff       backoff.BackOff
}

type ErrKafkaRetrieble

type ErrKafkaRetrieble struct {
	Err error
}

func (*ErrKafkaRetrieble) Error

func (e *ErrKafkaRetrieble) Error() string

type Handler

type Handler interface {
	Hanle(msg *kafka.Message) error
	MoveToDQL(msg *kafka.Message) error
}

Jump to

Keyboard shortcuts

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