RiESAEX commented on code in PR #1156:
URL:
https://github.com/apache/incubator-eventmesh/pull/1156#discussion_r945677804
##########
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:
for `create_time`
https://github.com/apache/incubator-eventmesh/blob/8b2f3fd38051fa85fe0f48421eb12e4d03205b42/eventmesh-common/src/main/java/org/apache/eventmesh/common/EventMeshMessage.java#L44
there is a field in java code, but it was not used (may be used in logger?).
I'm not sure if it's needed so I just commented it.
for ths `prop`, I just not sure what it is.
I found it only store the `TTL` (except test code of EventMeshMessage).
https://github.com/apache/incubator-eventmesh/blob/8b2f3fd38051fa85fe0f48421eb12e4d03205b42/eventmesh-protocol-plugin/eventmesh-protocol-grpc/src/main/proto/eventmesh-client.proto#L46-L50
In grpc producer, the `message` already has a `TTL` field and `prop` is sent,
https://github.com/apache/incubator-eventmesh/blob/8b2f3fd38051fa85fe0f48421eb12e4d03205b42/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/http/producer/EventMeshMessageProducer.java#L138
In http producer, I think the `prop` was not even send (It just pick up the
ttl in it, and put it to header).
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]