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

   Fixes #20934 
   
   ### Motivation
   
   <!-- Explain here the context, and why you're making that change. What is 
the problem you're trying to solve. -->
   We encountered an issue when chunked messages had to be retried, like
   ```
   org.apache.pulsar.client.api.PulsarClientException$InvalidMessageException: 
The producer mdl-pulsar-0-12 of the topic part-v1 sends a message with 7094331 
bytes that exceeds 5242880 bytes
   ```
   because retry letter and dead letter producers never enable chunking. Our 
chunked messages may be very large, so simply increasing the maximum is 
probably not a good option.
   
   This change allows the client to set if they want chunking and batching for 
these produces. The properties are separated in retry letter and dead letter, 
since currently the retry letter disables batching while the dead letter 
enables it implicitly. (So, we did not want a single pair of new properties to 
always set them to the same value.)
   
   ### Modifications
   
   <!-- Describe the modifications you've done. -->
   
   Edited the DeadLetterPolicy to add these new fields, and the ConsumerImpl to 
pick them up in the consumer and when creating the producers.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change added tests and can be verified as follows:
     - Added unit test for setting the new fields, including one checking the 
defaults
   
   ### Does this pull request potentially affect one of the following parts:
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   *If the box was checked, please highlight the changes*
   
   - [ ] Dependencies (add or upgrade a dependency)
   - [ ] The public API
   - [ ] The schema
   - [ ] The default values of configurations
   - [ ] The threading model
   - [ ] The binary protocol
   - [ ] The REST endpoints
   - [ ] The admin CLI options
   - [ ] The metrics
   - [ ] Anything that affects deployment
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [x] `doc-required` <!-- Your PR changes impact docs and you will update 
later -->
   - [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   We may want to update the Java client documentation to reflect these new 
options.
   
   ### Matching PR in forked repository
   
   PR in forked repository: https://github.com/rindavis/pulsar/pull/1


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