mjsax commented on code in PR #21515:
URL: https://github.com/apache/kafka/pull/21515#discussion_r2825242784


##########
streams/src/main/java/org/apache/kafka/streams/state/internals/ValueTimestampHeadersDeserializer.java:
##########
@@ -69,6 +69,11 @@ public void configure(final Map<String, ?> configs, final 
boolean isKey) {
         headersDeserializer.configure(configs, isKey);
     }
 
+    @Override
+    public ValueTimestampHeaders<V>  deserialize(final String topic, final 
Headers headers, final byte[] valueTimestampHeaders) {
+        throw new UnsupportedOperationException("Headers are encoded inside 
`valueTimestampHeaders` byte[] array and cannot be passed as parameter. Use 
`deserialize(String topic, byte[] valueTimestampHeaders)` instead.");

Review Comment:
   Frankly, I am not 100% if this is a too restrictive check?
   
   We could also check if `header == null || headers.toArray().size == 0` and 
allow the call for this case? Same for the serializer. Thoughts?



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