pub struct ConnectedPulsarBroker { /* private fields */ }Expand description
The typed witness that connect succeeded: holds the live client directly.
Implementations§
Source§impl ConnectedPulsarBroker
impl ConnectedPulsarBroker
Sourcepub fn publisher(&self) -> PulsarPublisher
pub fn publisher(&self) -> PulsarPublisher
A publisher from the connected form. It rides the same cell-backed publisher type as
the early path; by now connect has filled the cell, so it resolves immediately.
Sourcepub async fn subscribe_descriptor(
&self,
descriptor: PulsarSubscription,
) -> Result<PulsarSubscriber, PulsarError>
pub async fn subscribe_descriptor( &self, descriptor: PulsarSubscription, ) -> Result<PulsarSubscriber, PulsarError>
Opens the subscription described by descriptor.
§Errors
Returns PulsarError when the descriptor is invalid, the consumer cannot be created,
or the broker is shut down.
Trait Implementations§
Source§impl ConnectedBroker for ConnectedPulsarBroker
impl ConnectedBroker for ConnectedPulsarBroker
Source§type Error = PulsarError
type Error = PulsarError
Source§impl Debug for ConnectedPulsarBroker
impl Debug for ConnectedPulsarBroker
Source§impl DefaultPublish for ConnectedPulsarBroker
impl DefaultPublish for ConnectedPulsarBroker
Source§type Policy = PulsarPublish
type Policy = PulsarPublish
Source§impl PublishPolicy<ConnectedPulsarBroker> for PulsarPublish
impl PublishPolicy<ConnectedPulsarBroker> for PulsarPublish
Source§type Live = PulsarPublisher
type Live = PulsarPublisher
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: &ConnectedPulsarBroker,
) -> impl Future<Output = Result<Self::Live, PairError>>
fn pair( self, connected: &ConnectedPulsarBroker, ) -> impl Future<Output = Result<Self::Live, PairError>>
Source§fn channel_bindings(&self, channel: &str) -> Bindings
fn channel_bindings(&self, channel: &str) -> Bindings
AsyncAPI
document. Read moreSource§fn operation_bindings(&self, channel: &str) -> Bindings
fn operation_bindings(&self, channel: &str) -> Bindings
send operation in the document. Read moreSource§impl Subscribe for ConnectedPulsarBroker
impl Subscribe for ConnectedPulsarBroker
Source§type Copies = BrokerMoves
type Copies = BrokerMoves
A bare name opens the same consumer a descriptor does, so a spent delivery moves at the client here too, under the policy the registration declared.
Source§async fn subscribe(&self, name: &str) -> Result<Self::Subscriber, Self::Error>
async fn subscribe(&self, name: &str) -> Result<Self::Subscriber, Self::Error>
A bare name joins the broker’s default subscription,
so the handlers mounted by name compete on one durable cursor. A broker that names none
refuses with PulsarError::Invalid naming the setting.
Source§fn declare_retry(
&self,
name: &str,
declaration: &RetryDeclaration,
) -> Result<(), DeclareRetryError>
fn declare_retry( &self, name: &str, declaration: &RetryDeclaration, ) -> Result<(), DeclareRetryError>
Maps the declaration onto the consumer this name opens: the limit and the topic become
the client’s own DeadLetterPolicy, built in subscribe where the connection exists.
Source§type Subscriber = PulsarSubscriber
type Subscriber = PulsarSubscriber
Source§impl SubscriptionSource<ConnectedPulsarBroker> for PulsarSubscription
The Pulsar client moves a spent delivery itself: it counts the redeliveries of a message and,
past the consumer’s limit, produces it to the dead-letter topic and acknowledges the original.
Nothing is republished from the service, on any of the three addressing forms, so
out_retry(..) over this descriptor is a compile error and the registration’s declaration
reaches the consumer instead.
impl SubscriptionSource<ConnectedPulsarBroker> for PulsarSubscription
The Pulsar client moves a spent delivery itself: it counts the redeliveries of a message and,
past the consumer’s limit, produces it to the dead-letter topic and acknowledges the original.
Nothing is republished from the service, on any of the three addressing forms, so
out_retry(..) over this descriptor is a compile error and the registration’s declaration
reaches the consumer instead.
Source§fn declare_retry(self, declaration: &RetryDeclaration) -> Self
fn declare_retry(self, declaration: &RetryDeclaration) -> Self
Records the declaration; the consumer is built from it in subscribe, where the
connection exists.
Source§type Subscriber = PulsarSubscriber
type Subscriber = PulsarSubscriber
Source§type Copies = BrokerMoves
type Copies = BrokerMoves
AddressedCopies, NamedCopies or BrokerMoves. Read moreSource§async fn subscribe(
self,
connected: &ConnectedPulsarBroker,
) -> Result<PulsarSubscriber, PulsarError>
async fn subscribe( self, connected: &ConnectedPulsarBroker, ) -> Result<PulsarSubscriber, PulsarError>
Source§fn channel_bindings(&self) -> Bindings
fn channel_bindings(&self) -> Bindings
AsyncAPI document. Read moreSource§fn operation_bindings(&self) -> Bindings
fn operation_bindings(&self) -> Bindings
receive operation in the 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 message_bindings(&self) -> Bindings
fn message_bindings(&self) -> Bindings
Source§impl TestableBroker for ConnectedPulsarBroker
Available on crate feature testing only.The harness’s view of the connected broker: what it injects and reads back on the in-process
transport, and, on either transport, which subscriptions a publish reaches.
impl TestableBroker for ConnectedPulsarBroker
testing only.The harness’s view of the connected broker: what it injects and reads back on the in-process transport, and, on either transport, which subscriptions a publish reaches.
§Panics
inject and published panic on a broker connected with connect: the harness drives only
the transport connect_in_process produced, and a live connection has no log to read and no
synchronous way to take a message. inject panics on a message a server refuses (a
destination that is no topic name, a header value that is not UTF-8), which the trait gives no
way to report.
Source§fn routes(&self, destination: &str, subscriptions: &[&str]) -> Vec<usize>
fn routes(&self, destination: &str, subscriptions: &[&str]) -> Vec<usize>
Pulsar’s routing: a message reaches every subscription over its topic once, and within one
subscription one of its consumers, so each durable subscription the topic reaches is owed
the message once, by one of its consumers in subscriptions. In process that is the
consumer the transport picks for the next message; against a server, which picks its
consumer itself, it is the first of them. A topic reads the same under either spelling,
and a pattern matches the fully qualified names of the namespace its prefix names.
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 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 ConnectedPulsarBroker
impl !UnwindSafe for ConnectedPulsarBroker
impl Freeze for ConnectedPulsarBroker
impl Send for ConnectedPulsarBroker
impl Sync for ConnectedPulsarBroker
impl Unpin for ConnectedPulsarBroker
impl UnsafeUnpin for ConnectedPulsarBroker
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