pub struct EventBatch {
pub payload: RecordBatch,
pub metadata: ArcEventMetadata,
pub ack_token: Option<AckToken>,
}Expand description
The core unit of data flowing through a Kinetic pipeline.
An EventBatch wraps an Apache Arrow RecordBatch along with
metadata tracking its lineage, timing, and multi-tenant profile.
Fields§
§payload: RecordBatchThe actual data payload in columnar Arrow format.
metadata: ArcEventMetadataMetadata tracking the batch’s journey through the pipeline.
ack_token: Option<AckToken>Optional token for end-to-end acknowledgement.
Implementations§
Source§impl EventBatch
impl EventBatch
Sourcepub fn new(payload: RecordBatch, metadata: ArcEventMetadata) -> Result<Self>
pub fn new(payload: RecordBatch, metadata: ArcEventMetadata) -> Result<Self>
Create a new EventBatch from a RecordBatch and metadata.
This is a low-level constructor that assumes the payload is already correctly formatted.
Sourcepub fn new_with_xid(
payload: RecordBatch,
metadata: ArcEventMetadata,
) -> Result<Self>
pub fn new_with_xid( payload: RecordBatch, metadata: ArcEventMetadata, ) -> Result<Self>
Create a new EventBatch and ensure it has a unique _xid column.
This is temporarily mapped to new to delay xid creation until it is actually needed
(e.g., when routing to an error topic).
Sourcepub fn new_with_ack(
payload: RecordBatch,
metadata: ArcEventMetadata,
ack_token: AckToken,
) -> Result<Self>
pub fn new_with_ack( payload: RecordBatch, metadata: ArcEventMetadata, ack_token: AckToken, ) -> Result<Self>
Create a new EventBatch with an acknowledgement token.
Sourcepub fn estimated_size(&self) -> usize
pub fn estimated_size(&self) -> usize
Returns the estimated in-memory size of the batch in bytes.
Trait Implementations§
Source§impl Clone for EventBatch
impl Clone for EventBatch
Source§fn clone(&self) -> EventBatch
fn clone(&self) -> EventBatch
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more