This is an automated email from the ASF dual-hosted git repository.

mikexue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/eventmesh.git


The following commit(s) were added to refs/heads/master by this push:
     new 032ff8030 [ISSUE #4633] Optimize the message body of the Rust SDK's 
returned reply message (#4751)
032ff8030 is described below

commit 032ff8030e62a863116541091bbeb01e6849e42b
Author: Daniel Purnomo <[email protected]>
AuthorDate: Fri Jan 26 02:19:46 2024 +0100

    [ISSUE #4633] Optimize the message body of the Rust SDK's returned reply 
message (#4751)
    
    * optimized returned reply msg
    
    * corrected the change
---
 .../eventmesh-sdk-rust/src/grpc/grpc_consumer.rs           | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/eventmesh-sdks/eventmesh-sdk-rust/src/grpc/grpc_consumer.rs 
b/eventmesh-sdks/eventmesh-sdk-rust/src/grpc/grpc_consumer.rs
index ad18ccd20..e31c97a53 100644
--- a/eventmesh-sdks/eventmesh-sdk-rust/src/grpc/grpc_consumer.rs
+++ b/eventmesh-sdks/eventmesh-sdk-rust/src/grpc/grpc_consumer.rs
@@ -146,17 +146,6 @@ impl EventMeshGrpcConsumer {
                 let handled_msg = 
listener_inner.handle(eventmesh_message.unwrap());
                 if let Ok(msg_option) = handled_msg {
                     if let Some(_msg) = msg_option {
-                        let properties = HashMap::<String, String>::new();
-                        let reply = SubscriptionReply::new(
-                            EventMeshCloudEventUtils::get_subject(&received),
-                            EventMeshCloudEventUtils::get_subject(&received),
-                            
EventMeshCloudEventUtils::get_data_content(&received),
-                            EventMeshCloudEventUtils::get_seq_num(&received),
-                            EventMeshCloudEventUtils::get_unique_id(&received),
-                            EventMeshCloudEventUtils::get_ttl(&received),
-                            None,
-                            properties,
-                        );
                         received.attributes.insert(
                             ProtocolKey::SUB_MESSAGE_TYPE.to_string(),
                             PbCloudEventAttributeValue {
@@ -165,8 +154,7 @@ impl EventMeshGrpcConsumer {
                                 )),
                             },
                         );
-                        received.data =
-                            
Some(PbData::TextData(serde_json::to_string(&reply).unwrap()));
+                        received.data = None;
                         let _ = keeper.sender.send(received).await;
                     }
                 } else {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to