Crate strut_rabbitmq

Crate strut_rabbitmq 

Source
Expand description

Strut

Strut: convenient Rust backend

Backend in Rust: convenient and configurable with Strut. 🏗️


  • Strut is a Rust application scaffold that aims to simplify common backend chores.
  • The documentation is available on the ➡️ homepage.

§Crate strut-rabbitmq

⚠️ Internal crate

Unless you know exactly what you are doing, there is probably no need to directly depend on this crate.

This crate is a convenience layer around lapin crate.

Modules§

util
Exposes convenience layers around lapin types.

Structs§

BatchPublishingError
Represents a (partially) failed publishing of a batch of RabbitMQ messages.
Connector
Runs in the background, maintains no more than one active connection to a RabbitMQ cluster (referred to herein as current connection) identified by the given Handle. Exposes a cheaply clone-able Gateway, which any number of asynchronous tasks can use to retrieve a fresh Channel created in the current connection.
CustomExchange
Defines a custom RabbitMQ exchange, as opposed to any built-in variants.
DeclarationError
Represents failure to issue at least one of the declarations that are required before the subscriber can start consuming messages.
Dispatch
Represents an outgoing RabbitMQ message.
DispatchBuilder
Allows building an outgoing RabbitMQ Dispatch iteratively.
DsnChunks
Groups the pieces of a RabbitMQ DSN for convenient passing into Handle::new.
Egress
Defines an outbound path for messages being sent into a RabbitMQ cluster.
EgressBuilder
Builds an Egress incrementally and validates it on the final stage.
EgressLandscape
Represents a collection of uniquely named Egress definitions.
Envelope
Represents an incoming RabbitMQ message.
ExchangeBuilder
Builds an Exchange incrementally and validates it on the final stage.
Gateway
An asynchronous gateway to creating and retrieving fresh Channels on an internally maintained Connection.
Handle
Defines a connection handle for a RabbitMQ cluster, consisting primarily of a set of credentials, along with a bit of metadata for logging/debugging purposes.
HandleCollection
Represents a collection of uniquely named Handles.
Ingress
Defines an inbound path for messages being consumed from a RabbitMQ cluster.
IngressBuilder
Temporary struct for accumulating ingress configuration before finalizing it into a Ingress. This builder intends to apply validation only at meaningful states of the configuration, as opposed to every intermediary state.
IngressLandscape
Represents a collection of uniquely named Ingress definitions.
NonEmpty
Non-empty vector.
NoopDecoder
In some cases it is not necessary or not desirable to decode the incoming message’s bytes on consumption. This convenience implementation of Decoder enables such cases by not doing anything and returning a unit type ().
Publisher
Publishes outgoing Dispatches to the RabbitMQ cluster.
PublishingError
Represents a failed publishing of a single RabbitMQ message.
Queue
Defines of a RabbitMQ queue to be declared from the consuming side.
RabbitMqConfig
Represents the application-level configuration section that covers everything related to RabbitMQ connectivity:
StringDecoder
Implements Decoder that allocates an owned UTF-8 String with a copy of the given bytes. This decoder fails with FromUtf8Error if the given bytes cannot be interpreted as valid UTF-8.
Subscriber
Receives incoming Envelopes from the RabbitMQ cluster, passing them through a pre-set Decoder before returning to the caller.

Enums§

AckingBehavior
Defines how the consumed messages are acknowledged: explicitly or implicitly.
ConfirmationLevel
Defines the extent to which the message Publisher should confirm successful sending.
DeliveryMode
Defines whether RabbitMQ persists the messages to disk, which affects whether such messages are able to survive a broker restart.
EgressError
Represents the various error states of a RabbitMQ egress definition.
Exchange
Defines a RabbitMQ exchange to be used in definitions related to RabbitMQ routing.
ExchangeError
Represents the various error states that may arise when a RabbitMQ exchange definition becomes invalid.
ExchangeKind
Represents the supported kinds of RabbitMQ exchanges.
FinalizationKind
Represents the supporting ways of finalizing an incoming RabbitMQ message. Relevant only when the inbound messages are set to be manually acknowledged on the Ingress.
Header
Represents the value assigned to a RabbitMQ header, specifically the binding header. This enumeration is used for deserializing Ingress definitions.
HeadersMatchingBehavior
Defines the matching behavior for the Headers kind of exchange. Irrelevant for all other kinds of exchanges.
IngressError
Represents the various error states of a RabbitMQ ingress definition.
PublishingFailure
Explains what exactly went wrong in publishing a single RabbitMQ message.
QueueKind
Defines a RabbitMQ queue kind, which is currently limited to either classic or quorum queues. See the RabbitMQ documentation for details.
QueueRenamingBehavior
Defines optional queue renaming behavior. Values other than Verbatim trigger appending of a suffix to the user-provided queue name.

Constants§

EXCHANGE_AMQ_DIRECT
Name of the RabbitMQ built-in amq.direct exchange
EXCHANGE_AMQ_FANOUT
Name of the RabbitMQ built-in amq.fanout exchange
EXCHANGE_AMQ_HEADERS
Name of the RabbitMQ built-in amq.headers exchange
EXCHANGE_AMQ_MATCH
Name of the RabbitMQ built-in amq.match exchange
EXCHANGE_AMQ_TOPIC
Name of the RabbitMQ built-in amq.topic exchange
EXCHANGE_DEFAULT
Name of the RabbitMQ built-in default exchange

Traits§

Decoder
Represents a way of decoding a payload of an incoming message (which is received as a sequence of bytes) into an arbitrary result type.
EnvelopeStack
Represents a collection of Envelopes that can be acted upon with included convenience methods.

Functions§

strut_shutdown
Re-exports the strut_shutdown function to facilitate stand-alone usage of this crate.

Type Aliases§

BatchPublishingResult
Shorthand for a result of a batch publishing attempt.
PublishingResult
Shorthand for a result of a single publishing attempt.
StringSubscriber
Shorthand for a Subscriber that decodes messages into Strings.
UndecodedSubscriber
Shorthand for a Subscriber that does not decode consumed messages.