pub struct PubsubSourceConfig {
pub subscription: String,
pub connection: PubsubConnection,
pub value_format: ValueFormat,
pub attributes_key: String,
pub max_messages_per_pull: usize,
pub idle_termination_secs: Option<u64>,
pub max_messages: Option<usize>,
pub batch_size: usize,
}Expand description
Configuration for PubsubSource.
Fields§
§subscription: StringSubscription id (short name, not the fully-qualified path). The client
forms projects/<project>/subscriptions/<id> from the connection’s
project.
connection: PubsubConnectionProject / endpoint / emulator / credentials (flattened).
value_format: ValueFormatPayload decoding for the message data field.
attributes_key: StringJSON key the message attribute map is surfaced under. Default
__attributes.
max_messages_per_pull: usizeMessages requested per pull RPC (1–1000). Default 100.
idle_termination_secs: Option<u64>Stop after this many seconds without a new message. At least one of
idle_termination_secs and max_messages must be set (mirrors the
Kafka / Kinesis sources) — a batch run must terminate.
max_messages: Option<usize>Stop after this many messages in total.
batch_size: usizeRecords per emitted StreamPage. 0 is the
“no batching” sentinel: one page per drain. Default 1000. A page’s
messages are acked once the pipeline has durably written the page.
Implementations§
Trait Implementations§
Source§impl Clone for PubsubSourceConfig
impl Clone for PubsubSourceConfig
Source§fn clone(&self) -> PubsubSourceConfig
fn clone(&self) -> PubsubSourceConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PubsubSourceConfig
impl Debug for PubsubSourceConfig
Source§impl<'de> Deserialize<'de> for PubsubSourceConfig
impl<'de> Deserialize<'de> for PubsubSourceConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for PubsubSourceConfig
impl JsonSchema for PubsubSourceConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for PubsubSourceConfig
impl RefUnwindSafe for PubsubSourceConfig
impl Send for PubsubSourceConfig
impl Sync for PubsubSourceConfig
impl Unpin for PubsubSourceConfig
impl UnsafeUnpin for PubsubSourceConfig
impl UnwindSafe for PubsubSourceConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request