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


##########
inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/sink/mq/kafka/KafkaHandler.java:
##########
@@ -204,14 +205,18 @@ public void onCompletion(RecordMetadata arg0, Exception 
ex) {
     private void sendSimpleProfileV0(SimpleBatchPackProfileV0 event, 
IdTopicConfig idConfig,
             String topic) throws Exception {
         // headers
-        Map<String, String> headers = event.getSimpleProfile().getHeaders();
-        // compress
+        Map<String, String> headers = event.getProperties();
+        if (MapUtils.isEmpty(headers)) {
+            headers = event.getSimpleProfile().getHeaders();
+        }
+        // body
         byte[] bodyBytes = event.getSimpleProfile().getBody();
         // sendAsync
         long sendTime = System.currentTimeMillis();
 
         // prepare ProducerRecord
         ProducerRecord<String, byte[]> producerRecord = new 
ProducerRecord<>(topic, bodyBytes);
+

Review Comment:
   ditto.



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

Reply via email to