Skip to content

Commit f98ca8e

Browse files
chamonsfreeznet
authored andcommitted
fix: Ability to set deliver_at_time from SerializeMessage messages directly (streamnative#337)
streamnative#336 Before this, the only way to set deliver_at_time was via the MessageBuilder. Co-authored-by: Rui Fu <freeznet@users.noreply.github.com>
1 parent d4a7e1b commit f98ca8e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/producer.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ pub struct Message {
8181
pub event_time: ::std::option::Option<u64>,
8282
/// current version of the schema
8383
pub schema_version: ::std::option::Option<Vec<u8>>,
84+
/// UTC Unix timestamp in milliseconds, time at which the message should be
85+
/// delivered to consumers
86+
pub deliver_at_time: ::std::option::Option<i64>,
8487
}
8588

8689
/// internal message type carrying options that must be defined
@@ -126,6 +129,7 @@ impl From<Message> for ProducerMessage {
126129
replicate_to: m.replicate_to,
127130
event_time: m.event_time,
128131
schema_version: m.schema_version,
132+
deliver_at_time: m.deliver_at_time,
129133
..Default::default()
130134
}
131135
}

0 commit comments

Comments
 (0)