Skip to content

feat(kafka-logger): add configurable api_version for Apache Kafka 4.x support#13040

Open
macdoor wants to merge 8 commits intoapache:masterfrom
macdoor:feat/kafka-logger-api-version
Open

feat(kafka-logger): add configurable api_version for Apache Kafka 4.x support#13040
macdoor wants to merge 8 commits intoapache:masterfrom
macdoor:feat/kafka-logger-api-version

Conversation

@macdoor
Copy link

@macdoor macdoor commented Feb 27, 2026

… support

  • Set default api_version to 2 (Kafka 4.x drops magic0/magic1)
  • Make api_version configurable (0, 1, 2) for Kafka < 0.10.0.0 compatibility
  • Add api_version to broker_config when creating producer

Description

Which issue(s) this PR fixes:

Fixes #12984
Fixes #11811

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

… support

- Set default api_version to 2 (Kafka 4.x drops magic0/magic1)
- Make api_version configurable (0, 1, 2) for Kafka < 0.10.0.0 compatibility
- Add api_version to broker_config when creating producer

fix apache#12984

Made-with: Cursor
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Feb 27, 2026
段晓雄 added 3 commits February 27, 2026 16:03
- Revert CHANGELOG.md (maintainers update it during release)
- Set api_version default to 0 for backward compatibility
- Use conf.api_version directly without fallback

Made-with: Cursor
Avoid passing api_version=nil to producer config when not specified,
let lua-resty-kafka use its default (0) for backward compatibility.

Made-with: Cursor
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Feb 28, 2026
段晓雄 added 3 commits February 28, 2026 13:13
… numbering

- Switch Kafka 4.x image from apache/kafka to bitnamilegacy/kafka:4.0.0
- Add single-node replication factor settings for KRaft
- Simplify topic creation retry loop to {1..20}
- Run reindex to fix kafka-logger.t test numbering for lint

Made-with: Cursor
@macdoor macdoor force-pushed the feat/kafka-logger-api-version branch from e98db71 to 1812f51 Compare February 28, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

2 participants