Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Helper ¶
type Helper[T any] struct { // contains filtered or unexported fields }
Helper assists in creating event handlers.
type Options ¶
type Options struct { Topics []string TimeOut time.Duration ManualCommit bool MaxWorkers int64 Backoff bool BackoffBase time.Duration // Base duration for backoff MaxBackoff time.Duration // Maximum backoff duration RetryLimit int // Limit for retries (-1 for infinite retries) }
Options can be used to create customized handler.
func DefaultOptions ¶
DefaultOptions returns options based in config.
type Subscriber ¶
type Subscriber[T any] struct { // contains filtered or unexported fields }
Subscriber represents a subscriber listener.
func NewSubscriber ¶
func NewSubscriber[T any](consumer *kafka.Consumer, handler function.Handler[T], options *Options) *Subscriber[T]
NewSubscriber returns a subscriber listener.
Click to show internal directories.
Click to hide internal directories.