You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "CCCLL (via GitHub)" <gi...@apache.org> on 2026/10/14 06:10:35 UTC

[PR] MINOR: Match headers.separator of the console producer literally [kafka]

CCCLL opened a new pull request, #23812:
URL: https://github.com/apache/kafka/pull/23812

   With `parse.headers=true`, `kafka-console-producer.sh` splits the
   headers of each line on `headers.separator`. KIP-798 and the Javadoc
   of `LineMessageReader` describe it as a string, and
   `headers.delimiter` and `headers.key.separator` are matched
   literally, but `headers.separator` is compiled as a regular
   expression. A separator containing a regex metacharacter therefore
   does not work:
   
   - `|` splits between every character and fails with "No header key
     separator found in pair 'h'"
   - `.` silently produces records without any header
   - `+` or `\` fail with a `PatternSyntaxException`
   
   Compile the separator with `Pattern.LITERAL`. Separators without
   metacharacters, such as the default `,`, behave as before.
   
   The new test produces a record with two headers separated by each of
   these characters. It fails without the fix.


-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] MINOR: Match headers.separator of the console producer literally [kafka]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #23812:
URL: https://github.com/apache/kafka/pull/23812#issuecomment-6331862149

   A label of 'needs-attention' was automatically added to this PR in order to raise the
   attention of the committers. Once this issue has been triaged, the `triage` label
   should be removed to prevent this automation from happening again.


-- 
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-unsubscribe@kafka.apache.org

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