mxsm commented on code in PR #4632:
URL: https://github.com/apache/eventmesh/pull/4632#discussion_r1421422450


##########
eventmesh-sdks/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/consumer/SubStreamHandler.java:
##########
@@ -118,26 +116,19 @@ public void onCompleted() {
     private CloudEvent buildReplyMessage(final CloudEvent reqMessage, final T 
replyMessage) {
         final CloudEvent cloudEvent = 
EventMeshCloudEventBuilder.buildEventMeshCloudEvent(replyMessage,
             clientConfig, listener.getProtocolType());
-        SubscriptionReply subscriptionReply = 
SubscriptionReply.builder().producerGroup(clientConfig.getConsumerGroup())
-            .topic(EventMeshCloudEventUtils.getSubject(cloudEvent))
-            .content(EventMeshCloudEventUtils.getDataContent(cloudEvent))
-            .seqNum(EventMeshCloudEventUtils.getSeqNum(cloudEvent))
-            .uniqueId(EventMeshCloudEventUtils.getUniqueId(cloudEvent))
-            .ttl(EventMeshCloudEventUtils.getTtl(cloudEvent)).build();
 
         Map<String, String> prop = new HashMap<>();
         Map<String, CloudEventAttributeValue> reqMessageMap = 
reqMessage.getAttributesMap();
         reqMessageMap.entrySet().forEach(entry -> prop.put(entry.getKey(), 
entry.getValue().getCeString()));
         Map<String, CloudEventAttributeValue> cloudEventMap = 
cloudEvent.getAttributesMap();
         cloudEventMap.entrySet().forEach(entry -> prop.put(entry.getKey(), 
entry.getValue().getCeString()));
-        subscriptionReply.putAllProperties(prop);
 
-        return 
CloudEvent.newBuilder(cloudEvent).putAllAttributes(reqMessageMap)
+        return 
CloudEvent.newBuilder(cloudEvent).putAllAttributes(reqMessageMap).putAllAttributes(cloudEventMap)

Review Comment:
   > > if there are identical properties between the returned message and the 
consumed message, the properties of the consumed message will be used.
   > 
   > OK. Then what is role of `prop`?
   
   @pandaapo  I have removed it. my fault .



-- 
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]

Reply via email to