pub struct ConnectedRedisBroker { /* private fields */ }Expand description
The typed witness that Broker::connect succeeded: it owns the live fred pool.
Every subscription and every publisher is reached from here, so “not connected” is not
representable. ConnectedBroker::shutdown consumes it, which makes a publish or subscribe
after shutdown a compile error for the owner of the handle.
Implementations§
Source§impl ConnectedRedisBroker
impl ConnectedRedisBroker
Sourcepub async fn subscribe(
&self,
def: RedisStream,
) -> Result<RedisSubscriber, RedisError>
pub async fn subscribe( &self, def: RedisStream, ) -> Result<RedisSubscriber, RedisError>
Opens a stream subscription described by def.
Ensures the consumer group exists (XGROUP CREATE ... MKSTREAM, ignoring an
already-existing group) before returning the subscriber.
§Errors
Returns RedisError::ShutDown when the connection was already torn down,
RedisError::InvalidOptions when def names no consumer group, or
RedisError::Subscribe when the group cannot be created.
Sourcepub async fn subscribe_pubsub(
&self,
def: RedisPubSub,
) -> Result<RedisPubSubSubscriber, RedisError>
pub async fn subscribe_pubsub( &self, def: RedisPubSub, ) -> Result<RedisPubSubSubscriber, RedisError>
Opens a Pub/Sub subscription on one channel, described by def, on a dedicated client.
§Errors
Returns RedisError::ShutDown when the connection was already torn down,
RedisError::Connect when the dedicated client cannot connect, or
RedisError::Subscribe when the subscribe command fails.
Sourcepub async fn subscribe_pubsub_pattern(
&self,
def: RedisPubSubPattern,
) -> Result<RedisPubSubSubscriber, RedisError>
pub async fn subscribe_pubsub_pattern( &self, def: RedisPubSubPattern, ) -> Result<RedisPubSubSubscriber, RedisError>
Opens a Pub/Sub subscription on a glob (PSUBSCRIBE), described by def, on a dedicated
client.
§Errors
Returns RedisError::ShutDown when the connection was already torn down,
RedisError::Connect when the dedicated client cannot connect, or
RedisError::Subscribe when the subscribe command fails.
Sourcepub async fn subscribe_list(
&self,
def: RedisList,
) -> Result<RedisListSubscriber, RedisError>
pub async fn subscribe_list( &self, def: RedisList, ) -> Result<RedisListSubscriber, RedisError>
Opens a list (work-queue) subscription described by def.
§Errors
Returns RedisError::ShutDown when the connection was already torn down,
RedisError::InvalidOptions when def names a recovery ZSET without a min_idle, or
RedisError::Connect when the connection the subscription reads on cannot connect.
Sourcepub fn publisher(&self) -> RedisPublisher
pub fn publisher(&self) -> RedisPublisher
Returns a stream publisher (XADD) bound to this connection.
Sourcepub fn default_publisher(&self) -> RedisDefaultPublisher
pub fn default_publisher(&self) -> RedisDefaultPublisher
Returns the publisher of the broker’s default policy, RedisDefaultPublish, which
writes each name the way this connection’s subscriptions read it.
Sourcepub fn pubsub_publisher(
&self,
publish: RedisPubSubPublish,
) -> RedisPubSubPublisher
pub fn pubsub_publisher( &self, publish: RedisPubSubPublish, ) -> RedisPubSubPublisher
Returns a Pub/Sub publisher configured by publish (mode and envelope codec).
Sourcepub fn list_publisher(&self, publish: RedisListPublish) -> RedisListPublisher
pub fn list_publisher(&self, publish: RedisListPublish) -> RedisListPublisher
Returns a list publisher (LPUSH) configured by publish (envelope codec and key TTL).
Sourcepub fn pool_handle(&self) -> Result<Pool, RedisError>
pub fn pool_handle(&self) -> Result<Pool, RedisError>
Returns a clone of the underlying pool, for advanced operations not covered by the wrapper.
§Errors
Returns RedisError::ShutDown once the connection was torn down.
Trait Implementations§
Source§impl ConnectedBroker for ConnectedRedisBroker
impl ConnectedBroker for ConnectedRedisBroker
Source§async fn shutdown(self) -> Result<Self::Closed, Self::Error>
async fn shutdown(self) -> Result<Self::Closed, Self::Error>
Closes every pooled connection and marks the shared connection dead, so publishers handed
out earlier report RedisError::ShutDown instead of running against a closed pool.
§Errors
Returns RedisError::Connect when the QUIT roundtrip fails.
Source§type Error = RedisError
type Error = RedisError
Source§impl Debug for ConnectedRedisBroker
impl Debug for ConnectedRedisBroker
Source§impl DefaultPublish for ConnectedRedisBroker
impl DefaultPublish for ConnectedRedisBroker
Source§type Policy = RedisDefaultPublish
type Policy = RedisDefaultPublish
Source§impl PublishPolicy<ConnectedRedisBroker> for RedisPublish
impl PublishPolicy<ConnectedRedisBroker> for RedisPublish
Source§fn channel_bindings(&self, channel: &str) -> Bindings
fn channel_bindings(&self, channel: &str) -> Bindings
An XADD carries its headers as entry fields and the policy has no settings of its own, so
what the document learns from here is which Redis structure the channel is and which stream
key the entries are appended to.
Source§type Live = RedisPublisher
type Live = RedisPublisher
Publisher for a leaf policy, or the live
wiring form for a combinator stack (a typed publisher over a policy pairs into the same
typed publisher over the live leaf).Source§fn pair(
self,
connected: &ConnectedRedisBroker,
) -> impl Future<Output = Result<Self::Live, PairError>>
fn pair( self, connected: &ConnectedRedisBroker, ) -> impl Future<Output = Result<Self::Live, PairError>>
Source§fn operation_bindings(&self, channel: &str) -> Bindings
fn operation_bindings(&self, channel: &str) -> Bindings
send operation in the document. Read moreSource§impl PublishPolicy<ConnectedRedisBroker> for RedisDefaultPublish
impl PublishPolicy<ConnectedRedisBroker> for RedisDefaultPublish
Source§fn channel_bindings(&self, channel: &str) -> Bindings
fn channel_bindings(&self, channel: &str) -> Bindings
Described as the stream publish, the family of a name no subscription of the service reads; the document is built before any subscription opens, so a name that turns out to be read as a list or a channel is described as a stream.
Source§type Live = RedisDefaultPublisher
type Live = RedisDefaultPublisher
Publisher for a leaf policy, or the live
wiring form for a combinator stack (a typed publisher over a policy pairs into the same
typed publisher over the live leaf).Source§fn pair(
self,
connected: &ConnectedRedisBroker,
) -> impl Future<Output = Result<Self::Live, PairError>>
fn pair( self, connected: &ConnectedRedisBroker, ) -> impl Future<Output = Result<Self::Live, PairError>>
Source§fn operation_bindings(&self, channel: &str) -> Bindings
fn operation_bindings(&self, channel: &str) -> Bindings
send operation in the document. Read moreSource§impl PublishPolicy<ConnectedRedisBroker> for RedisListPublish
impl PublishPolicy<ConnectedRedisBroker> for RedisListPublish
Source§fn channel_bindings(&self, channel: &str) -> Bindings
fn channel_bindings(&self, channel: &str) -> Bindings
The list key the policy pushes onto, the expiry it re-arms there on every push, and how headers are framed beside the payload.
Source§type Live = RedisListPublisher
type Live = RedisListPublisher
Publisher for a leaf policy, or the live
wiring form for a combinator stack (a typed publisher over a policy pairs into the same
typed publisher over the live leaf).Source§fn pair(
self,
connected: &ConnectedRedisBroker,
) -> impl Future<Output = Result<Self::Live, PairError>>
fn pair( self, connected: &ConnectedRedisBroker, ) -> impl Future<Output = Result<Self::Live, PairError>>
Source§fn operation_bindings(&self, channel: &str) -> Bindings
fn operation_bindings(&self, channel: &str) -> Bindings
send operation in the document. Read moreSource§impl PublishPolicy<ConnectedRedisBroker> for RedisPubSubPublish
impl PublishPolicy<ConnectedRedisBroker> for RedisPubSubPublish
Source§fn channel_bindings(&self, channel: &str) -> Bindings
fn channel_bindings(&self, channel: &str) -> Bindings
The channel a PUBLISH goes out on, the delivery mode it goes out in, and how headers are
framed beside the payload.
Source§type Live = RedisPubSubPublisher
type Live = RedisPubSubPublisher
Publisher for a leaf policy, or the live
wiring form for a combinator stack (a typed publisher over a policy pairs into the same
typed publisher over the live leaf).Source§fn pair(
self,
connected: &ConnectedRedisBroker,
) -> impl Future<Output = Result<Self::Live, PairError>>
fn pair( self, connected: &ConnectedRedisBroker, ) -> impl Future<Output = Result<Self::Live, PairError>>
Source§fn operation_bindings(&self, channel: &str) -> Bindings
fn operation_bindings(&self, channel: &str) -> Bindings
send operation in the document. Read moreSource§impl RedeliveryAddressed<ConnectedRedisBroker> for RedisList
The list key: the subscription pops from it and RedisListPublish pushes onto it, so a
deferred copy lands in the same queue the delivery came from.
impl RedeliveryAddressed<ConnectedRedisBroker> for RedisList
The list key: the subscription pops from it and RedisListPublish pushes onto it, so a
deferred copy lands in the same queue the delivery came from.
Source§fn redelivery_address(
&self,
_connected: &ConnectedRedisBroker,
) -> impl Future<Output = Result<RedeliveryAddress, RedisError>>
fn redelivery_address( &self, _connected: &ConnectedRedisBroker, ) -> impl Future<Output = Result<RedeliveryAddress, RedisError>>
Source§impl<Mode: WindowMode> RedeliveryAddressed<ConnectedRedisBroker> for Pipelined<RedisStream, Mode>
impl<Mode: WindowMode> RedeliveryAddressed<ConnectedRedisBroker> for Pipelined<RedisStream, Mode>
Source§fn redelivery_address(
&self,
connected: &ConnectedRedisBroker,
) -> impl Future<Output = Result<RedeliveryAddress, RedisError>>
fn redelivery_address( &self, connected: &ConnectedRedisBroker, ) -> impl Future<Output = Result<RedeliveryAddress, RedisError>>
Source§impl<Mode: WindowMode> RedeliveryAddressed<ConnectedRedisBroker> for Pipelined<RedisList, Mode>
impl<Mode: WindowMode> RedeliveryAddressed<ConnectedRedisBroker> for Pipelined<RedisList, Mode>
Source§fn redelivery_address(
&self,
connected: &ConnectedRedisBroker,
) -> impl Future<Output = Result<RedeliveryAddress, RedisError>>
fn redelivery_address( &self, connected: &ConnectedRedisBroker, ) -> impl Future<Output = Result<RedeliveryAddress, RedisError>>
Source§impl<Mode: WindowMode> RedeliveryAddressed<ConnectedRedisBroker> for Pipelined<RedisPubSub, Mode>
impl<Mode: WindowMode> RedeliveryAddressed<ConnectedRedisBroker> for Pipelined<RedisPubSub, Mode>
Source§fn redelivery_address(
&self,
connected: &ConnectedRedisBroker,
) -> impl Future<Output = Result<RedeliveryAddress, RedisError>>
fn redelivery_address( &self, connected: &ConnectedRedisBroker, ) -> impl Future<Output = Result<RedeliveryAddress, RedisError>>
Source§impl RedeliveryAddressed<ConnectedRedisBroker> for RedisPubSub
The channel itself.
impl RedeliveryAddressed<ConnectedRedisBroker> for RedisPubSub
The channel itself.
The answer is about the address, not about the command: reaching a
PubSubMode::Sharded subscription still takes a publisher in the same mode, which is the
policy the mount site names with out_retry.
Source§fn redelivery_address(
&self,
_connected: &ConnectedRedisBroker,
) -> impl Future<Output = Result<RedeliveryAddress, RedisError>>
fn redelivery_address( &self, _connected: &ConnectedRedisBroker, ) -> impl Future<Output = Result<RedeliveryAddress, RedisError>>
Source§impl RedeliveryAddressed<ConnectedRedisBroker> for RedisStream
The stream key, in every read mode: an XADD there is read by the consumer group this
subscription belongs to.
impl RedeliveryAddressed<ConnectedRedisBroker> for RedisStream
The stream key, in every read mode: an XADD there is read by the consumer group this
subscription belongs to.
Under reclaim the copy is read by the group’s tail reader rather
than by this subscription, which only ever takes entries already pending on another consumer.
That is the topology the mode is written for - a reclaim subscriber runs beside a
new one on the same group - so the copy reaches the handler either way.
Source§fn redelivery_address(
&self,
_connected: &ConnectedRedisBroker,
) -> impl Future<Output = Result<RedeliveryAddress, RedisError>>
fn redelivery_address( &self, _connected: &ConnectedRedisBroker, ) -> impl Future<Output = Result<RedeliveryAddress, RedisError>>
Source§impl Subscribe for ConnectedRedisBroker
impl Subscribe for ConnectedRedisBroker
Source§type Copies = AddressedCopies
type Copies = AddressedCopies
A bare name opens a consumer group over that stream key, and an XADD there is read by the
group again, so the name is both ends and a retry copy needs nothing from the mount site.
Source§type Subscriber = RedisSubscriber
type Subscriber = RedisSubscriber
Source§fn declare_retry(
&self,
name: &str,
declaration: &RetryDeclaration,
) -> Result<(), DeclareRetryError>
fn declare_retry( &self, name: &str, declaration: &RetryDeclaration, ) -> Result<(), DeclareRetryError>
Source§impl SubscriptionSource<ConnectedRedisBroker> for RedisList
impl SubscriptionSource<ConnectedRedisBroker> for RedisList
Source§type Copies = AddressedCopies
type Copies = AddressedCopies
A retry copy is an LPUSH this process makes, and the list key is where it goes.
Source§type Subscriber = RedisListSubscriber
type Subscriber = RedisListSubscriber
Source§fn declare_retry(self, declaration: &RetryDeclaration) -> Self
fn declare_retry(self, declaration: &RetryDeclaration) -> Self
Source§async fn subscribe(
self,
connected: &ConnectedRedisBroker,
) -> Result<Self::Subscriber, RedisError>
async fn subscribe( self, connected: &ConnectedRedisBroker, ) -> Result<Self::Subscriber, RedisError>
Source§fn channel_bindings(&self) -> Bindings
fn channel_bindings(&self) -> Bindings
AsyncAPI document. Read moreSource§fn declare_retry_on(
&self,
connected: &C,
declaration: &RetryDeclaration,
) -> Result<(), DeclareRetryError>
fn declare_retry_on( &self, connected: &C, declaration: &RetryDeclaration, ) -> Result<(), DeclareRetryError>
Source§fn operation_bindings(&self) -> Bindings
fn operation_bindings(&self) -> Bindings
receive operation in the document. Read moreSource§fn message_bindings(&self) -> Bindings
fn message_bindings(&self) -> Bindings
Source§impl<Mode: WindowMode> SubscriptionSource<ConnectedRedisBroker> for Pipelined<RedisStream, Mode>
impl<Mode: WindowMode> SubscriptionSource<ConnectedRedisBroker> for Pipelined<RedisStream, Mode>
Source§type Subscriber = PipelinedSubscriber<RedisSubscriber, StreamForm>
type Subscriber = PipelinedSubscriber<RedisSubscriber, StreamForm>
Source§type Copies = AddressedCopies
type Copies = AddressedCopies
AddressedCopies, NamedCopies or BrokerMoves. Read moreSource§fn declare_retry(self, declaration: &RetryDeclaration) -> Self
fn declare_retry(self, declaration: &RetryDeclaration) -> Self
Source§fn channel_bindings(&self) -> Bindings
fn channel_bindings(&self) -> Bindings
AsyncAPI document. Read moreSource§async fn subscribe(
self,
connected: &ConnectedRedisBroker,
) -> Result<Self::Subscriber, RedisError>
async fn subscribe( self, connected: &ConnectedRedisBroker, ) -> Result<Self::Subscriber, RedisError>
Source§fn declare_retry_on(
&self,
connected: &C,
declaration: &RetryDeclaration,
) -> Result<(), DeclareRetryError>
fn declare_retry_on( &self, connected: &C, declaration: &RetryDeclaration, ) -> Result<(), DeclareRetryError>
Source§fn operation_bindings(&self) -> Bindings
fn operation_bindings(&self) -> Bindings
receive operation in the document. Read moreSource§fn message_bindings(&self) -> Bindings
fn message_bindings(&self) -> Bindings
Source§impl<Mode: WindowMode> SubscriptionSource<ConnectedRedisBroker> for Pipelined<RedisPubSub, Mode>
impl<Mode: WindowMode> SubscriptionSource<ConnectedRedisBroker> for Pipelined<RedisPubSub, Mode>
Source§type Subscriber = PipelinedSubscriber<ChannelReader, PubSubForm>
type Subscriber = PipelinedSubscriber<ChannelReader, PubSubForm>
Source§type Copies = AddressedCopies
type Copies = AddressedCopies
AddressedCopies, NamedCopies or BrokerMoves. Read moreSource§fn declare_retry(self, declaration: &RetryDeclaration) -> Self
fn declare_retry(self, declaration: &RetryDeclaration) -> Self
Source§fn channel_bindings(&self) -> Bindings
fn channel_bindings(&self) -> Bindings
AsyncAPI document. Read moreSource§async fn subscribe(
self,
connected: &ConnectedRedisBroker,
) -> Result<Self::Subscriber, RedisError>
async fn subscribe( self, connected: &ConnectedRedisBroker, ) -> Result<Self::Subscriber, RedisError>
Source§fn declare_retry_on(
&self,
connected: &C,
declaration: &RetryDeclaration,
) -> Result<(), DeclareRetryError>
fn declare_retry_on( &self, connected: &C, declaration: &RetryDeclaration, ) -> Result<(), DeclareRetryError>
Source§fn operation_bindings(&self) -> Bindings
fn operation_bindings(&self) -> Bindings
receive operation in the document. Read moreSource§fn message_bindings(&self) -> Bindings
fn message_bindings(&self) -> Bindings
Source§impl<Mode: WindowMode> SubscriptionSource<ConnectedRedisBroker> for Pipelined<RedisPubSubPattern, Mode>
A pattern reads every channel its glob matches and names none a publish could reach, so the
mount site names where a retry copy goes, as on the pattern subscription without a window.
impl<Mode: WindowMode> SubscriptionSource<ConnectedRedisBroker> for Pipelined<RedisPubSubPattern, Mode>
A pattern reads every channel its glob matches and names none a publish could reach, so the mount site names where a retry copy goes, as on the pattern subscription without a window.
Source§type Subscriber = PipelinedSubscriber<ChannelReader, PubSubForm>
type Subscriber = PipelinedSubscriber<ChannelReader, PubSubForm>
Source§type Copies = NamedCopies
type Copies = NamedCopies
AddressedCopies, NamedCopies or BrokerMoves. Read moreSource§async fn subscribe(
self,
connected: &ConnectedRedisBroker,
) -> Result<Self::Subscriber, RedisError>
async fn subscribe( self, connected: &ConnectedRedisBroker, ) -> Result<Self::Subscriber, RedisError>
Source§fn channel_bindings(&self) -> Bindings
fn channel_bindings(&self) -> Bindings
AsyncAPI document. Read moreSource§fn declare_retry(self, declaration: &RetryDeclaration) -> Selfwhere
Self: Sized,
fn declare_retry(self, declaration: &RetryDeclaration) -> Selfwhere
Self: Sized,
Source§fn declare_retry_on(
&self,
connected: &C,
declaration: &RetryDeclaration,
) -> Result<(), DeclareRetryError>
fn declare_retry_on( &self, connected: &C, declaration: &RetryDeclaration, ) -> Result<(), DeclareRetryError>
Source§fn operation_bindings(&self) -> Bindings
fn operation_bindings(&self) -> Bindings
receive operation in the document. Read moreSource§fn message_bindings(&self) -> Bindings
fn message_bindings(&self) -> Bindings
Source§impl<Mode: WindowMode> SubscriptionSource<ConnectedRedisBroker> for Pipelined<RedisList, Mode>
impl<Mode: WindowMode> SubscriptionSource<ConnectedRedisBroker> for Pipelined<RedisList, Mode>
Source§type Subscriber = PipelinedSubscriber<ListReader, ListForm>
type Subscriber = PipelinedSubscriber<ListReader, ListForm>
Source§type Copies = AddressedCopies
type Copies = AddressedCopies
AddressedCopies, NamedCopies or BrokerMoves. Read moreSource§fn declare_retry(self, declaration: &RetryDeclaration) -> Self
fn declare_retry(self, declaration: &RetryDeclaration) -> Self
Source§fn channel_bindings(&self) -> Bindings
fn channel_bindings(&self) -> Bindings
AsyncAPI document. Read moreSource§async fn subscribe(
self,
connected: &ConnectedRedisBroker,
) -> Result<Self::Subscriber, RedisError>
async fn subscribe( self, connected: &ConnectedRedisBroker, ) -> Result<Self::Subscriber, RedisError>
Source§fn declare_retry_on(
&self,
connected: &C,
declaration: &RetryDeclaration,
) -> Result<(), DeclareRetryError>
fn declare_retry_on( &self, connected: &C, declaration: &RetryDeclaration, ) -> Result<(), DeclareRetryError>
Source§fn operation_bindings(&self) -> Bindings
fn operation_bindings(&self) -> Bindings
receive operation in the document. Read moreSource§fn message_bindings(&self) -> Bindings
fn message_bindings(&self) -> Bindings
Source§impl SubscriptionSource<ConnectedRedisBroker> for RedisPubSub
impl SubscriptionSource<ConnectedRedisBroker> for RedisPubSub
Source§type Copies = AddressedCopies
type Copies = AddressedCopies
Pub/Sub cannot acknowledge, so every retry is a copy this process publishes, and the channel is where it goes.
Source§type Subscriber = RedisPubSubSubscriber
type Subscriber = RedisPubSubSubscriber
Source§fn declare_retry(self, declaration: &RetryDeclaration) -> Self
fn declare_retry(self, declaration: &RetryDeclaration) -> Self
Source§async fn subscribe(
self,
connected: &ConnectedRedisBroker,
) -> Result<Self::Subscriber, RedisError>
async fn subscribe( self, connected: &ConnectedRedisBroker, ) -> Result<Self::Subscriber, RedisError>
Source§fn channel_bindings(&self) -> Bindings
fn channel_bindings(&self) -> Bindings
AsyncAPI document. Read moreSource§fn declare_retry_on(
&self,
connected: &C,
declaration: &RetryDeclaration,
) -> Result<(), DeclareRetryError>
fn declare_retry_on( &self, connected: &C, declaration: &RetryDeclaration, ) -> Result<(), DeclareRetryError>
Source§fn operation_bindings(&self) -> Bindings
fn operation_bindings(&self) -> Bindings
receive operation in the document. Read moreSource§fn message_bindings(&self) -> Bindings
fn message_bindings(&self) -> Bindings
Source§impl SubscriptionSource<ConnectedRedisBroker> for RedisPubSubPattern
A pattern subscription reads every channel the glob matches, and a glob is not a channel a
PUBLISH can name, so the mount site names where a retry copy goes: .out_retry(policy).to(..)
for a fixed channel, or a transform that reads the delivery’s own channel.
impl SubscriptionSource<ConnectedRedisBroker> for RedisPubSubPattern
A pattern subscription reads every channel the glob matches, and a glob is not a channel a
PUBLISH can name, so the mount site names where a retry copy goes: .out_retry(policy).to(..)
for a fixed channel, or a transform that reads the delivery’s own channel.
Source§type Subscriber = RedisPubSubSubscriber
type Subscriber = RedisPubSubSubscriber
Source§type Copies = NamedCopies
type Copies = NamedCopies
AddressedCopies, NamedCopies or BrokerMoves. Read moreSource§async fn subscribe(
self,
connected: &ConnectedRedisBroker,
) -> Result<Self::Subscriber, RedisError>
async fn subscribe( self, connected: &ConnectedRedisBroker, ) -> Result<Self::Subscriber, RedisError>
Source§fn channel_bindings(&self) -> Bindings
fn channel_bindings(&self) -> Bindings
AsyncAPI document. Read moreSource§fn declare_retry(self, declaration: &RetryDeclaration) -> Selfwhere
Self: Sized,
fn declare_retry(self, declaration: &RetryDeclaration) -> Selfwhere
Self: Sized,
Source§fn declare_retry_on(
&self,
connected: &C,
declaration: &RetryDeclaration,
) -> Result<(), DeclareRetryError>
fn declare_retry_on( &self, connected: &C, declaration: &RetryDeclaration, ) -> Result<(), DeclareRetryError>
Source§fn operation_bindings(&self) -> Bindings
fn operation_bindings(&self) -> Bindings
receive operation in the document. Read moreSource§fn message_bindings(&self) -> Bindings
fn message_bindings(&self) -> Bindings
Source§impl SubscriptionSource<ConnectedRedisBroker> for RedisStream
impl SubscriptionSource<ConnectedRedisBroker> for RedisStream
Source§type Copies = AddressedCopies
type Copies = AddressedCopies
A retry copy is an XADD this process makes, and the stream key is where it goes.
Source§type Subscriber = RedisSubscriber
type Subscriber = RedisSubscriber
Source§fn declare_retry(self, declaration: &RetryDeclaration) -> Self
fn declare_retry(self, declaration: &RetryDeclaration) -> Self
Source§async fn subscribe(
self,
connected: &ConnectedRedisBroker,
) -> Result<Self::Subscriber, RedisError>
async fn subscribe( self, connected: &ConnectedRedisBroker, ) -> Result<Self::Subscriber, RedisError>
Source§fn channel_bindings(&self) -> Bindings
fn channel_bindings(&self) -> Bindings
AsyncAPI document. Read moreSource§fn declare_retry_on(
&self,
connected: &C,
declaration: &RetryDeclaration,
) -> Result<(), DeclareRetryError>
fn declare_retry_on( &self, connected: &C, declaration: &RetryDeclaration, ) -> Result<(), DeclareRetryError>
Source§fn operation_bindings(&self) -> Bindings
fn operation_bindings(&self) -> Bindings
receive operation in the document. Read moreSource§fn message_bindings(&self) -> Bindings
fn message_bindings(&self) -> Bindings
Source§impl TestableBroker for ConnectedRedisBroker
Available on crate feature testing only.The harness’s view of the connection: the in-process server it injects into and reads the
writes of, and, in both modes, where a publish is delivered.
impl TestableBroker for ConnectedRedisBroker
testing only.The harness’s view of the connection: the in-process server it injects into and reads the writes of, and, in both modes, where a publish is delivered.
§Panics
inject and published panic on a broker connected with connect: the harness drives only
the connection connect_in_process produced, and a live connection has no log to read and no
synchronous way to take a message.
Source§fn inject(&self, message: OutgoingMessage<'_>)
fn inject(&self, message: OutgoingMessage<'_>)
Writes the message the way the default publisher writes its name: an XADD, or the
LPUSH or PUBLISH of the subscription that reads it, in that subscription’s framing. A
name only pattern subscriptions read goes out with a raw PUBLISH, as the producers they
listen to publish it: an XADD would reach none of them.
Source§fn published(&self, name: &str) -> Vec<RawMessage>
fn published(&self, name: &str) -> Vec<RawMessage>
Every write to name, decoded the way the subscription reading it decodes: an entry’s
fields, or a list element or a channel message in its subscription’s framing. A requeue’s
copy and a delayed entry the sweep adds back are writes too.
Source§fn routes(&self, destination: &str, subscriptions: &[&str]) -> Vec<usize>
fn routes(&self, destination: &str, subscriptions: &[&str]) -> Vec<usize>
Redis’s routing: a stream entry is delivered once to every consumer group reading the stream (to one consumer of each), a list element to one consumer, and a channel message to every subscription of the channel and every pattern subscription whose glob matches it. A name no subscription reads exactly is reached by the pattern subscriptions alone.
Subscriptions sharing a name are told apart by nothing but the name, so a publish is owed by the first position of each name as many times as that name receives it. In process that is where it goes: a group’s new entries go to its earliest open subscription.
Source§fn install_coordinator(&self, coordinator: Coordinator)
fn install_coordinator(&self, coordinator: Coordinator)
Source§fn backlog(&self) -> Backlog
fn backlog(&self) -> Backlog
Backlog::Missed for publish/subscribe,
Backlog::Delivered for a queue or a log that keeps them. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ConnectedRedisBroker
impl !UnwindSafe for ConnectedRedisBroker
impl Freeze for ConnectedRedisBroker
impl Send for ConnectedRedisBroker
impl Sync for ConnectedRedisBroker
impl Unpin for ConnectedRedisBroker
impl UnsafeUnpin for ConnectedRedisBroker
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more