Skip to content

Commit

Permalink
remove kinesis message contents
Browse files Browse the repository at this point in the history
  • Loading branch information
tabVersion committed Jan 5, 2024
1 parent 1df7136 commit 09c654c
Showing 1 changed file with 1 addition and 30 deletions.
31 changes: 1 addition & 30 deletions src/connector/src/source/kinesis/source/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,7 @@ use aws_smithy_types_convert::date_time::DateTimeExt;
use crate::source::{SourceMessage, SourceMeta, SplitId};

#[derive(Clone, Debug)]
pub struct KinesisMessage {
pub shard_id: SplitId,
pub sequence_number: String,
pub partition_key: String,
pub payload: Vec<u8>,
}

impl From<KinesisMessage> for SourceMessage {
// not in use
fn from(msg: KinesisMessage) -> Self {
SourceMessage {
key: Some(msg.partition_key.into_bytes()),
payload: Some(msg.payload),
offset: msg.sequence_number.clone(),
split_id: msg.shard_id,
meta: SourceMeta::Empty,
}
}
}
pub struct KinesisMessage {}

#[derive(Clone, Debug)]
pub struct KinesisMeta {
Expand All @@ -57,14 +39,3 @@ pub fn from_kinesis_record(value: &Record, split_id: SplitId) -> SourceMessage {
}),
}
}

impl KinesisMessage {
pub fn new(shard_id: SplitId, message: Record) -> Self {
KinesisMessage {
shard_id,
sequence_number: message.sequence_number,
partition_key: message.partition_key,
payload: message.data.into_inner(),
}
}
}

0 comments on commit 09c654c

Please sign in to comment.