feat: Add @azure/functions-extensions-kafka package for KafkaRecord binding (#103) - #104
Open
Tsuyoshi Ushio (TsuyoshiUshio) wants to merge 3 commits into
Open
Conversation
…inding New package that enables Node.js users to bind to raw Apache Kafka records with full metadata access via Protobuf deserialization. New files: - types/index.d.ts — KafkaRecord, KafkaHeader, KafkaTimestamp, KafkaTimestampType - src/kafka/kafkaRecordDecoder.ts — Protobuf wire format decoder - src/kafka/kafkaRecordFactory.ts — ModelBindingData → KafkaRecord conversion - src/kafka/registerKafkaRecordFactory.ts — 'AzureKafkaRecord' factory registration - src/index.ts — Auto-registers factory on import, exports types - test/kafkaRecordFactory.test.ts — 8 tests (decoder + factory) - package.json, tsconfig.json, webpack.config.js — Build configuration Follows the ServiceBus extensions package pattern exactly. No changes needed to nodejs-library or nodejs-worker. Fixes Azure#103 Relates to Azure/azure-functions-kafka-extension#612 Co-authored-by: Dobby <dobby@microsoft.com>
…fka extension - Add kafka_extension to CI build matrices (minimal-build.yml, build.yml) - Add kafka_extension to test matrices (tests.yml) for Node 18/20/22/24 - Add sample app: kafkaTriggerSample with KafkaRecord binding example - Add CI-required tooling: .eslintrc.json, updateVersion.ts, validateRelease.ts - Fix lint errors: unbound method reference, tsconfig include paths - Update package.json with lint/updateVersion scripts and devDependencies Build: webpack compiled successfully Tests: 8 passing Lint: 0 errors Co-authored-by: Dobby <dobby@microsoft.com>
Contributor
Author
|
E2E testing (Docker Compose + Kafka broker) is tracked separately in #105 due to the additional infrastructure complexity (Kafka KRaft broker setup, extension bundle dependency, topic auto-creation). This PR covers the package implementation, unit tests, CI build/lint/version integration, and sample app. |
…fka sample - Package README.md with installation, usage, type reference, and architecture - Sample README.md with Prerequisites, Quick Start, configuration table, Confluent Cloud / Event Hubs auth examples, troubleshooting guide - local.settings.json.example with BrokerList placeholder - .funcignore for deployment filtering Co-authored-by: Dobby <dobby@microsoft.com>
This was referenced Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
@azure/functions-extensions-kafkapackage that enables Node.js users to bind to raw Apache Kafka records (KafkaRecordtype) with full metadata access via Protobuf deserialization.Issue
Fixes #103
Relates to Azure/azure-functions-kafka-extension#612
Changes
New package:
azure-functions-nodejs-extensions-kafka/types/index.d.tsKafkaRecord,KafkaHeader,KafkaTimestamp,KafkaTimestampTypesrc/kafka/kafkaRecordDecoder.tsprotobufjs/minimalsrc/kafka/kafkaRecordFactory.tsModelBindingData→KafkaRecordconversion (single + batch)src/kafka/registerKafkaRecordFactory.ts"AzureKafkaRecord"factory withResourceFactoryResolversrc/index.tstest/kafkaRecordFactory.test.tsFollows the
azure-functions-nodejs-extensions-servicebuspattern exactly.No changes needed to
azure-functions-nodejs-libraryorazure-functions-nodejs-worker.Dependencies
@azure/functions-extensions-base0.3.0protobufjs^7.4.0Breaking Changes
None. New package — all existing Kafka bindings continue to work.
Testing
User Experience