harshithasudhakar commented on code in PR #4702:
URL: https://github.com/apache/eventmesh/pull/4702#discussion_r1445016775


##########
eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/tcp/codec/Codec.java:
##########
@@ -116,31 +102,45 @@ public void encode(ChannelHandlerContext ctx, Package 
pkg, ByteBuf out) throws E
         }
     }
 
-    public static class Decoder extends ReplayingDecoder<Package> {
+    public static class Decoder extends LengthFieldBasedFrameDecoder {
+
+        public Decoder() {
+            super(FRAME_MAX_LENGTH, PREFIX_LENGTH, Integer.BYTES, -9, 0);

Review Comment:
   @mxsm I'm curious to understand the thought processes behind choosing a 
hard-coded value over a dynamic value. I'm wondering about potential future 
flexibility. Have we considered scenarios where the header structure might 
evolve, and how a dynamic approach might handle those cases?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to