You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/10/31 03:18:17 UTC

[GitHub] [inlong] pocozh commented on a diff in pull request #6325: [INLONG-6324][DataProxy] Optimize DataProxy's message processing on the source side

pocozh commented on code in PR #6325:
URL: https://github.com/apache/inlong/pull/6325#discussion_r1008994823


##########
inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/utils/MessageUtils.java:
##########
@@ -56,33 +63,197 @@ public static boolean isSyncSendForOrder(Event event) {
     }
 
     /**
-     * Convert String to ByteBuf
+     *  process response to client
+     * @param commonAttrMap attribute map
+     * @param resultMap     result map
+     * @param remoteChannel client channel
+     * @param msgType       the message type
+     */
+    public static void returnSourceRspPackage(Map<String, String> commonAttrMap,

Review Comment:
   suggest to remove "return" in the method name



##########
inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/sink/pulsar/PulsarClientService.java:
##########
@@ -243,7 +242,7 @@ private void sendResponse(OrderEvent orderEvent, String inlongGroupId, String in
                     logger.debug("order message rsp: seqId = {}, inlongGroupId = {}, inlongStreamId = {}", sequenceId,
                             inlongGroupId, inlongStreamId);
                 }
-                ByteBuf binBuffer = MessageUtils.getResponsePackage("", MsgType.MSG_BIN_MULTI_BODY, sequenceId);
+                ByteBuf binBuffer = MessageUtils.buildBinMsgRspPackage("", sequenceId);

Review Comment:
   Suggest to add `dpIp` attribute here.



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org