[ 
https://issues.apache.org/jira/browse/CAMEL-12651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16544253#comment-16544253
 ] 

ASF GitHub Bot commented on CAMEL-12651:
----------------------------------------

oscerd commented on a change in pull request #2427: CAMEL-12651 - Allow to 
override headers serializing and deserializing
URL: https://github.com/apache/camel/pull/2427#discussion_r202518973
 
 

 ##########
 File path: 
components/camel-kafka/src/test/java/org/apache/camel/component/kafka/serde/DefaultKafkaHeaderSerializerTest.java
 ##########
 @@ -0,0 +1,47 @@
+package org.apache.camel.component.kafka.serde;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+import static org.junit.Assert.assertArrayEquals;
+
+@RunWith(Parameterized.class)
+public class DefaultKafkaHeaderSerializerTest {
+
+    private KafkaHeaderSerializer serializer = new 
DefaultKafkaHeaderSerializer();
+
+    private Object value;
+    private byte[] expectedResult;
+
+    public DefaultKafkaHeaderSerializerTest(Object value, byte[] 
expectedResult) {
+        this.value = value;
+        this.expectedResult = expectedResult;
+    }
+
+    @Test
+    public void serialize() {
+        byte[] result = serializer.serialize("someKey", value);
+
+        System.out.println(Arrays.toString(result));
 
 Review comment:
   Use a log and don't print on standard out please

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Allow to override serializing and deserializing default mechanism for kafka 
> headers
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-12651
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12651
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-kafka
>            Reporter: Taras Danylchuk
>            Priority: Major
>
> Kafka headers propagation is available since 2.22.0 but default mechanism for 
> serializing and desirialising is not enough in some corner cases.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to