lhotari opened a new pull request, #24626:
URL: https://github.com/apache/pulsar/pull/24626

   ### Motivation
   
   Using the Pulsar Proxy could result in a `TooLongFrameException`.
   
   When the Pulsar Proxy switches to direct proxy mode, it removes the frame 
decoder:
   
https://github.com/apache/pulsar/blob/baa288a0e5acdb7dca94e5c4b066e4a41e06fc55/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/DirectProxyHandler.java#L419-L426
   
   However, this fails since the client changes the "frameDecoder" handler's 
name to "newFrameDecoder"
   
https://github.com/apache/pulsar/blob/baa288a0e5acdb7dca94e5c4b066e4a41e06fc55/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java#L396-L404
   
   A possible workaround is to use `proxyZeroCopyModeEnabled=true` since in the 
zero copy mode, the channel handlers are ignored. The Zero copy mode cannot be 
enabled when TLS is enabled between the Pulsar Proxy and Pulsar Brokers.
   
   ### Modifications
   
   - fix the issue in removing the frame decoder when switching to direct proxy 
mode
   - refactor frame decoder logic to reduce code duplication and future errors
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update 
later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->


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