Categorygithub.com/Clarilab/eh-rabbitmq/v2
modulepackage
2.1.0
Repository: https://github.com/clarilab/eh-rabbitmq.git
Documentation: pkg.go.dev

# README

eh-rabbitmq/v2

rabbitmq event bus implementation for eventhorizon

# Functions

NewContextWithNumRetries sets the retries value to use in the context.
NewEventBus creates an EventBus, with optional settings.
NumRetriesFromContext returns the number of retries from the context, or zero.
WithClariMQConnections sets the connections used for publishing and consuming events.
WithClariMQPublishingCache enables caching events that failed to be published.
WithConsumerQuantity sets the number of concurrent consumers.
WithEventCodec uses the specified codec for encoding events.
WithHandlerConsumeAfterAdd allows handlers to start consuming immediately after they have been added.
WithHandlerExchange is an option to set the handler exchange.
WithHandlerTopic is an option to set the handler topic.
WithLogging enables logging to the given loggers.
WithMaxRecoveryRetry sets the max count for recovery retries.
WithPublishingExchange is an option to set the publishing exchange.
WithPublishingTopic is an option to set the publishing topic.
WithRetry enables event retries.

# Constants

DefaultNumRetries is the retry value to use if not set in the context.
InfiniteRetries is the maximum number for recovery or event delivery retries.

# Variables

ErrCouldNotBeRouted is returned when a mandatory message could not be routed.
ErrFailedToPublishChannelClosed occurs when the channel accessed but is closed.
ErrErrHandlerNotRegistered is returned when calling RemoveHandler with a handler that is not registered.
ErrInvalidEventHandler when an invalid eventhorizon.EventHandler was provided.

# Structs

EventBus is a local event bus that delegates handling of published events to all matching registered handlers, in order of registration.
EventBusError is an async error containing the error returned from a handler and the event that it happened on.
ErrRecoveryFailed occurs when the recovery failed after a connection loss.

# Interfaces

EventHandler is an interface for a type that handles events.

# Type aliases

No description provided by the author
HandlerOption is a handler option.
MaxRetriesExceededHandler is a function that is called when the maximum number of retries has been reached.
Option is an option setter used to configure creation.
PublishOption is a publish option.