package
0.0.0-20230102091508-02d5eeac7d74
Repository: https://github.com/golang-boy/watermill.git
Documentation: pkg.go.dev
# Functions
CorrelationID adds correlation ID to all messages produced by the handler.
Duplicator is processing messages twice, to ensure that the endpoint is idempotent.
InstantAck makes the handler instantly acknowledge the incoming message, regardless of any errors.
MessageCorrelationID returns correlation ID from the message.
NewIgnoreErrors creates a new IgnoreErrors middleware.
NewThrottle creates a new Throttle middleware.
PoisonQueue provides a middleware that salvages unprocessable messages and published them on a separate topic.
PoisonQueueWithFilter is just like PoisonQueue, but accepts a function that decides which errors qualify for the poison queue.
RandomFail makes the handler fail with an error based on random chance.
RandomPanic makes the handler panic based on random chance.
Recoverer recovers from any panic in the handler and appends RecoveredPanicError with the stacktrace to any error returned from the handler.
SetCorrelationID sets a correlation ID for the message.
Timeout makes the handler cancel the incoming message's context after a specified time.
# Constants
CorrelationIDMetadataKey is used to store the correlation ID in metadata.
Metadata keys which marks the reason and context why the message was deemed poisoned.
Metadata keys which marks the reason and context why the message was deemed poisoned.
Metadata keys which marks the reason and context why the message was deemed poisoned.
Metadata keys which marks the reason and context why the message was deemed poisoned.
# Variables
ErrInvalidPoisonQueueTopic occurs when the topic supplied to the PoisonQueue constructor is invalid.
# Structs
IgnoreErrors provides a middleware that makes the handler ignore some explicitly whitelisted errors.
RecoveredPanicError holds the recovered panic's error along with the stacktrace.
Retry provides a middleware that retries the handler if errors are returned.
Throttle provides a middleware that limits the amount of messages processed per unit of time.