pub struct ConnectedZmqQueue<Role = Bind> { /* private fields */ }Expand description
The connected form of ZmqQueue; sockets attach per subscription and per publisher.
Implementations§
Source§impl<Role> ConnectedZmqQueue<Role>
impl<Role> ConnectedZmqQueue<Role>
Sourcepub fn bound_address(&self) -> Option<String>
pub fn bound_address(&self) -> Option<String>
The address a local subscription resolved by binding (useful with an ephemeral
tcp://...:0 endpoint); None until a subscription has bound.
Sourcepub fn publisher(&self) -> ZmqQueuePublisher
pub fn publisher(&self) -> ZmqQueuePublisher
A publisher from the connected form.
Trait Implementations§
Source§impl<Role: EndpointRole> ConnectedBroker for ConnectedZmqQueue<Role>
impl<Role: EndpointRole> ConnectedBroker for ConnectedZmqQueue<Role>
Source§impl<Role> Debug for ConnectedZmqQueue<Role>
impl<Role> Debug for ConnectedZmqQueue<Role>
Source§impl<Role: EndpointRole> DefaultPublish for ConnectedZmqQueue<Role>
impl<Role: EndpointRole> DefaultPublish for ConnectedZmqQueue<Role>
Source§type Policy = ZmqQueuePublish
type Policy = ZmqQueuePublish
Source§impl<Role: EndpointRole> PublishPolicy<ConnectedZmqQueue<Role>> for ZmqQueuePublish
impl<Role: EndpointRole> PublishPolicy<ConnectedZmqQueue<Role>> for ZmqQueuePublish
Source§fn pair(
self,
connected: &ConnectedZmqQueue<Role>,
) -> impl Future<Output = Result<Self::Live, PairError>>
fn pair( self, connected: &ConnectedZmqQueue<Role>, ) -> impl Future<Output = Result<Self::Live, PairError>>
Source§fn channel_bindings(&self, channel: &str) -> Bindings
fn channel_bindings(&self, channel: &str) -> Bindings
The destination reaches the binding, because on this pattern it is also what frame 0 of every message on the channel holds.
Source§type Live = ZmqQueuePublisher
type Live = ZmqQueuePublisher
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 operation_bindings(&self, channel: &str) -> Bindings
fn operation_bindings(&self, channel: &str) -> Bindings
send operation in the document. Read moreSource§impl Subscribe for ConnectedZmqQueue<Bind>
impl Subscribe for ConnectedZmqQueue<Bind>
Source§type Copies = AddressedCopies
type Copies = AddressedCopies
The subscribe name is the address: the subscription binds the endpoint, a PUSH socket of this service dials that listener, and a publish under the subscription’s name reaches it. The runtime publishes a retry copy there, and nothing has to be written at the mount site.
This is the whole retry path on ZeroMQ. Nothing settles a delivery, so a handler asking
for retry_after is served only by the deferred copy the runtime publishes here.
Competing consumers still compete for that copy, so the worker that retries is not
necessarily the one that asked.
Source§type Subscriber = ZmqSubscriber
type Subscriber = ZmqSubscriber
Source§fn declare_retry(
&self,
name: &str,
declaration: &RetryDeclaration,
) -> Result<(), DeclareRetryError>
fn declare_retry( &self, name: &str, declaration: &RetryDeclaration, ) -> Result<(), DeclareRetryError>
Source§impl Subscribe for ConnectedZmqQueue<Connect>
impl Subscribe for ConnectedZmqQueue<Connect>
Source§type Copies = NamedCopies
type Copies = NamedCopies
A subscription that dials reads from the PUSH peer at the endpoint, a ventilator that
sends and takes nothing, so a copy published back to it is refused by the handshake. The
subscription therefore addresses no copy, and every registration names where its copies
go: .out_retry(policy).to("name") over a broker that reaches a consumer, or a transform
that names one per delivery. A registration that names neither is refused before the
subscription opens, and a .build() chain that names neither does not compile.
Source§type Subscriber = ZmqSubscriber
type Subscriber = ZmqSubscriber
Source§fn declare_retry(
&self,
name: &str,
declaration: &RetryDeclaration,
) -> Result<(), DeclareRetryError>
fn declare_retry( &self, name: &str, declaration: &RetryDeclaration, ) -> Result<(), DeclareRetryError>
Source§impl<Role: EndpointRole> TestableBroker for ConnectedZmqQueue<Role>
The queue’s routing: a peer that pushes into an endpoint a subscription binds reaches that
subscription, and one that subscriptions dial hands each message to one of them in turn,
whatever its name frame says. A publish of this service reaches its own subscription only
through the listener that subscription bound.
impl<Role: EndpointRole> TestableBroker for ConnectedZmqQueue<Role>
The queue’s routing: a peer that pushes into an endpoint a subscription binds reaches that subscription, and one that subscriptions dial hands each message to one of them in turn, whatever its name frame says. A publish of this service reaches its own subscription only through the listener that subscription bound.
Source§fn install_coordinator(&self, coordinator: Coordinator)
fn install_coordinator(&self, coordinator: Coordinator)
Source§fn inject(&self, message: OutgoingMessage<'_>)
fn inject(&self, message: OutgoingMessage<'_>)
Source§fn published(&self, name: &str) -> Vec<RawMessage>
fn published(&self, name: &str) -> Vec<RawMessage>
name on this broker, in publish order, after the
evicted ones. Backs the harness’s published::<T>(name) assertions and
expect_published.Source§fn routes(&self, _destination: &str, subscriptions: &[&str]) -> Vec<usize>
fn routes(&self, _destination: &str, subscriptions: &[&str]) -> Vec<usize>
destination is delivered to,
as the broker’s own routing picks them: the positions in subscriptions (the names the
app subscribed under on this broker) of the ones it delivers to. Read moreSource§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<Role = Bind> !RefUnwindSafe for ConnectedZmqQueue<Role>
impl<Role = Bind> !UnwindSafe for ConnectedZmqQueue<Role>
impl<Role> Freeze for ConnectedZmqQueue<Role>
impl<Role> Send for ConnectedZmqQueue<Role>
impl<Role> Sync for ConnectedZmqQueue<Role>
impl<Role> Unpin for ConnectedZmqQueue<Role>
impl<Role> UnsafeUnpin for ConnectedZmqQueue<Role>
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