healchow commented on code in PR #5809:
URL: https://github.com/apache/inlong/pull/5809#discussion_r964340372


##########
inlong-sdk/sort-sdk/src/main/java/org/apache/inlong/sdk/sort/impl/decode/MessageDeserializer.java:
##########
@@ -144,4 +162,64 @@ private List<InLongMessage> 
transformMessageObjs(ClientContext context, InLongTo
         }
         return inLongMessages;
     }
+
+    private List<InLongMessage> decodeInlongMsg(
+            ClientContext context,
+            InLongTopic inLongTopic,
+            byte[] msgBytes,
+            Map<String, String> headers) {
+        List<InLongMessage> messageList = new ArrayList<>();
+
+        String groupId = 
Optional.ofNullable(headers.get(INLONGMSG_ATTR_GROUP_ID))
+                .orElseThrow(() -> new IllegalArgumentException("Could not 
find "
+                        + INLONGMSG_ATTR_GROUP_ID + " in attributes!"));
+
+        InLongMsg inLongMsg = InLongMsg.parseFrom(msgBytes);
+        for (String attr : inLongMsg.getAttrs()) {
+            Map<String, String> attributes = StringUtil.splitKv(attr, 
INLONGMSG_ATTR_ENTRY_DELIMITER,
+                    INLONGMSG_ATTR_KV_DELIMITER, null, null);
+
+            /*String groupId = 
Optional.ofNullable(attributes.get(INLONGMSG_ATTR_GROUP_ID))

Review Comment:
   Suggests removing unused codes.



-- 
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-unsubscr...@inlong.apache.org

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

Reply via email to