consumer

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithConcurrency

func WithConcurrency(concurrency int) func(*consumerImplOptions)

func WithInitialBackoff added in v0.15.0

func WithInitialBackoff(d time.Duration) func(*consumerImplOptions)

func WithLogger added in v0.9.1

func WithLogger(logger *logging.Logger) func(*consumerImplOptions)

func WithMaxBackoff added in v0.15.0

func WithMaxBackoff(d time.Duration) func(*consumerImplOptions)

func WithMaxConsecutiveErrors added in v0.15.0

func WithMaxConsecutiveErrors(n int) func(*consumerImplOptions)

func WithName

func WithName(name string) func(*consumerImplOptions)

Types

type Consumer

type Consumer interface {
	Run(context.Context) error
}

func New

func New(subscription mqs.Subscription, handler MessageHandler, opts ...func(*consumerImplOptions)) Consumer

type MessageHandler

type MessageHandler interface {
	Handle(context.Context, *mqs.Message) error
}

type Option added in v1.6.0

type Option = func(*consumerImplOptions)

Option configures a consumer created with New.

Jump to

Keyboard shortcuts

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