consume

package
v0.0.0-...-e24ef45 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageHandler

type MessageHandler func(ctx context.Context, msg pulsar.Message) MessageHandlerResult

MessageHandler is a function that will be called everytime a message arrives at a consumer.

type MessageHandlerResult

type MessageHandlerResult func(consumer pulsar.Consumer, msg pulsar.Message) error

MessageHandlerResult will be returned by the MessageHandler. The MessageHandlerResult will Ack/Nack the message.

func Ack

Ack should be returned by a MessageHandler whenever the message needs to be acknowledged.

func Later

func Later(delay time.Duration) MessageHandlerResult

Later should be returned by a MessageHandler whenever the message needs to be re-consumed later.

func Nack

func Nack() MessageHandlerResult

Nack should be returned by a MessageHandler whenever the message needs to be NOT acknowledged.

type Option

type Option func(*pulsar.ConsumerOptions)

func WithCustomConsumerOptions

func WithCustomConsumerOptions(f Option) Option

Jump to

Keyboard shortcuts

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