florin-akermann opened a new pull request #11456:
URL: https://github.com/apache/kafka/pull/11456


   Adding: --property parse.headers=true to cmdl enabled header parsing.
   Just like with the ConsoleConsumer, tif headers and/or key enabled then the 
order is "headers key value".
   The separator for the header and headerKey are configurabel and default to 
the same as in the ConsoleConsumer.
   
   In short,
   
   Default parsing pattern when:
   parse.headers=true and parse.key=true:
       "h1:v1,h2...\tkey\tvalue"
   parse.headers=false and parse.key=true:
       "key\tvalue"
   parse.headers=true and parse.key=false:
       "h1:v1,h2...\tvalue" 
   
   Testing strategy:
   The testing is constrained to testing LineMessageReader as this is the only 
affected class.
   Different combinations of parse.headers=true|false and parse.key=true|false 
are tested.
   Different string patterns are tested. Including input that does not fit the 
expected Pattern.
   LineMessageReaderTest.testLineReader suggests that the change is backward 
compatible.
   
   This contribution is my original work and I license the work to the project 
under the project's open source license.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to