MatrixHB commented on code in PR #63:
URL: 
https://github.com/apache/rocketmq-schema-registry/pull/63#discussion_r975978943


##########
client/src/main/java/org/apache/rocketmq/schema/registry/client/serde/avro/AvroDeserializer.java:
##########
@@ -59,7 +58,11 @@ public void configure(Map<String, Object> configs) {
     }
 
     @Override
-    public T deserialize(String subject, byte[] payload)
+    public T deserialize(String subject, byte[] payload) {
+        return this.deserialize(subject, payload, null);
+    }

Review Comment:
   Can this method support both bySubject and byRecordId?  For example, add a 
configuration item for _SerdeConfig_?
   Because byRecordId is applicable to message and rocketmq-connect, but not to 
rocketmq-streams, because the streams scenario cannot require that the data 
written to MQ must have a recordId, which will greatly reduce the flexibility 
of streams applications.
   
   能否通过这一个方法,同时支持bySubject和 byRecordId 两种方式?? 比如增加 SerdeConfig 的一个配置项?
   因为byRecordId 
适用于message场景和connect场景,但是不适用于streams场景,streams场景无法要求写入MQ的数据一定要带着recordId,这会大大降低streams应用的灵活性(也就是需要允许payload完全是消息内容,不带recordId,这样的设计才更有灵活性)。



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