Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.14.0
-
None
-
Novice
Description
The constructor of io.netty.handler.codec.DelimiterBasedFrameDecoder includes a boolean stripDelimiter parameter, which is always set to true by the ChannelHandlerFactories.newDelimiterBasedFrameDecoder method (both directly and within org.apache.camel.component.netty4.codec.DatagramPacketDelimiterDecoder, which delegates to DelimiterBasedFrameDecoder)
This parameter needs to be set to false when the end-of-frame delimiter is part of the message (e.g., the closing tag of an XML document), and therefore must not be discarded.
Suggested fix:
- Add a new constructor to DatagramPacketDelimiterDecoder that includes the parameter, which is then passed through to the delegate DelimiterBasedFrameDecoder
- Add a new method signature for ChannelHandlerFactories.newDelimiterBasedFrameDecoder that includes the parameter
- refactor existing newDelimiterBasedFrameDecoder method to delegate to the new method