You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by GitBox <gi...@apache.org> on 2022/08/15 08:10:52 UTC
[GitHub] [incubator-eventmesh] Alonexc commented on a diff in pull request #1156: [ISSUE #815] feat: Rust sdk
Alonexc commented on code in PR #1156:
URL: https://github.com/apache/incubator-eventmesh/pull/1156#discussion_r945509733
##########
eventmesh-sdk-rust/eventmesh/src/message.rs:
##########
@@ -0,0 +1,38 @@
+use serde::{Deserialize, Serialize};
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct EventMeshMessage {
+ #[serde(rename = "bizseqno")]
+ pub biz_seq_no: String,
+ #[serde(rename = "uniqueid")]
+ pub unique_id: String,
+ pub topic: String,
+ pub content: String,
+ // pub prop: HashMap<String, String>,
+ pub ttl: i32,
+ // pub(crate) create_time: u64,
+}
+impl EventMeshMessage {
+ pub fn new(biz_seq_no: &str, unique_id: &str, topic: &str, content: &str, ttl: i32) -> Self {
+ Self {
+ biz_seq_no: biz_seq_no.to_string(),
+ unique_id: unique_id.to_string(),
+ topic: topic.to_string(),
+ content: content.to_string(),
+ ttl,
Review Comment:
If the code is not used subsequently, it may be possible to remove the commented out code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org