pub struct TypedTableViewBuilder<'a, S: Schema, E: Engine = TokioEngine> { /* private fields */ }Expand description
Builder for a TypedTableView. Mirrors Java’s schema-aware
pulsar.tableViewBuilder(Schema) shape.
Engine-generic. Same shape as TableViewBuilder<E>; the S
schema parameter is decoder-only.
Implementations§
Source§impl<'a, S: Schema, E: Engine> TypedTableViewBuilder<'a, S, E>
impl<'a, S: Schema, E: Engine> TypedTableViewBuilder<'a, S, E>
Sourcepub fn subscription_name(self, name: impl Into<String>) -> Self
pub fn subscription_name(self, name: impl Into<String>) -> Self
Override the auto-generated subscription name.
Sourcepub fn receiver_queue_size(self, size: usize) -> Self
pub fn receiver_queue_size(self, size: usize) -> Self
Override the receiver-queue size.
Sourcepub fn crypto_failure_action(self, action: CryptoFailureAction) -> Self
pub fn crypto_failure_action(self, action: CryptoFailureAction) -> Self
PIP-4 decryption failure handling, forwarded to the underlying consumer.
Mirrors Java TableViewBuilder#cryptoFailureAction (typed view variant). See
TableViewBuilder::crypto_failure_action for semantics.
Sourcepub fn auto_update_partitions_interval(self, interval: Duration) -> Self
pub fn auto_update_partitions_interval(self, interval: Duration) -> Self
Periodically re-check the topic’s partition count. Mirrors Java
TableViewBuilder#autoUpdatePartitionsInterval (typed view variant). See
TableViewBuilder::auto_update_partitions_interval for semantics (zero
interval disables; default None).
Sourcepub async fn create(
self,
) -> Result<TypedTableView<S, <E::ClientState as SubscribeApi>::Consumer>, PulsarError>
pub async fn create( self, ) -> Result<TypedTableView<S, <E::ClientState as SubscribeApi>::Consumer>, PulsarError>
Subscribe and return the schema-aware view via the engine-generic
TableViewBuilder::create path.
PIP-4 decryption guardrail (BREAKING since the decryptor-storage lift).
If Self::encryption was called on the per-engine specialisation,
.create() returns PulsarError::Other instead of silently opening
a plaintext consumer. The engine-generic dispatch cannot thread an
engine-typed decryptor through subscribe, so the previous “silently
drop the decryptor” behaviour was a footgun. Use
Self::create_with_decryption on the tokio specialisation instead.
§Errors
PulsarError::Otherif a decryptor was configured viaSelf::encryption— callcreate_with_decryption()instead.PulsarError::Otheron broker rejection or wire failure (stringified).
Source§impl<S: Schema> TypedTableViewBuilder<'_, S, TokioEngine>
Tokio-engine-specific TypedTableViewBuilder methods.
impl<S: Schema> TypedTableViewBuilder<'_, S, TokioEngine>
Tokio-engine-specific TypedTableViewBuilder methods.
Sourcepub fn encryption(self, decryptor: Arc<dyn MessageDecryptor>) -> Self
pub fn encryption(self, decryptor: Arc<dyn MessageDecryptor>) -> Self
Configure PIP-4 end-to-end decryption on the underlying consumer.
Mirrors Java TableViewBuilder#cryptoKeyReader (typed view variant). See
TableViewBuilder::encryption for semantics. Tokio-engine-only;
pair with Self::create_with_decryption to honor the decryptor.
Sourcepub async fn create_with_decryption(
self,
) -> Result<TypedTableView<S>, PulsarError>
pub async fn create_with_decryption( self, ) -> Result<TypedTableView<S>, PulsarError>
Subscribe and return the schema-aware view, honoring the
configured PIP-4 decryptor. Tokio-engine-only. Use Self::create
for the engine-generic path that ignores the decryptor.
§Errors
PulsarError::Clienton broker rejection or wire failure.