Skip to content

feat(kafka): add support for Confluence Producers #6833

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 19, 2025

Conversation

leandrodamascena
Copy link
Contributor

Issue number:

Summary

Changes

This is an important fix to support customers using Confluent schema integration on the producer side of Protobuf messages. This only applies for Protobuf and not for Avro.

According to the wire format of the Confluent serializers message-indices are injected as additional bytes after magic bytes and schema id:

magic-byte, schema-id, message-indexes, protobuf-payload

We need to strip these message-indexes before attempting to parse the data using the plain Google protobuf library. This is what this PR is doing:

  1. Attempt to parse using plain protobuf
  2. If it fails
    1. Attempt to strip message-indexes and parse again
  3. If it still fails we have some corrupted data or a schema mismatch and raise an exception

User experience

Please share what the user experience looks like before and after this change

Checklist

If your change doesn't seem to apply, please leave them unchecked.

Is this a breaking change?

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@leandrodamascena leandrodamascena requested a review from a team as a code owner June 19, 2025 10:14
@boring-cyborg boring-cyborg bot added the tests label Jun 19, 2025
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 19, 2025
@leandrodamascena leandrodamascena changed the title Adding support for Confluence Producers feat(kafka): add support for Confluence Producers Jun 19, 2025
@github-actions github-actions bot added the feature New feature or functionality label Jun 19, 2025
Copy link

codecov bot commented Jun 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.20%. Comparing base (fe9bdcb) to head (25c66e9).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #6833   +/-   ##
========================================
  Coverage    96.19%   96.20%           
========================================
  Files          273      273           
  Lines        12626    12641   +15     
  Branches       938      940    +2     
========================================
+ Hits         12146    12161   +15     
  Misses         375      375           
  Partials       105      105           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@leandrodamascena leandrodamascena merged commit 9dd3376 into develop Jun 19, 2025
12 checks passed
@leandrodamascena leandrodamascena deleted the kafka/support-confluence branch June 19, 2025 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or functionality size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants