Module carrot_cake::consumers
source · Expand description
Facilities to consume messages from a RabbitMq queue. Check out ConsumerGroup
as a
starting point.
Modules§
- A collection of ready-made hooks for the most common use cases.
Structs§
- A collection of RabbitMq consumers sharing the same context and connection settings.
- A builder to register message handlers once the group-level configuration of a
ConsumerGroup
has been finalised. - A builder for group-level configuration of a
ConsumerGroup
. - A received AMQP message.
- The error type returned by message handlers.
- A dequeued message enriched with some auxiliary data, ready for processing.
- A handler processing messages from a RabbitMq queue.
- A builder to compose a
MessageHandler
with a fluent API. - The remainder of the middleware chain (telemetry + processing), including the final message handler.
- The remainder of the processing middleware chain, including the final message handler.
- The outcome of message processing:
Enums§
- The action we asked the broker to take when finalising the processing of the current message.
- Types of failure when handling a message. Used by the pub sub framework to handle retries/nacks/dead letter queues/etc.
- Determines if a failed message should be re-queued.
Traits§
- A hook to execute logic before a
MessageHandler
starts processing messages. - A hook to determine if failed messages due to a transient error should be requeued.
- Implementers of the
Handler
trait can be used in our RabbitMqMessageHandler
s to process messages retrieved from a queue. - Middlewares to execute logic before and after the message handler function.
- Middlewares to collect and emit telemetry data based on the outcome of message processing.
Functions§
- Retrieve an item from message-local storage based on its type.
- Insert an item in message-local storage. If another item with the same type was already stored in message-local storage it gets replaced.