-
Notifications
You must be signed in to change notification settings - Fork 282
Update kafka types #3199
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
Update kafka types #3199
Conversation
enable_batching: { | ||
type: 'boolean', | ||
label: 'Batch Data to Kafka?', | ||
description: 'If true, Segment will batch events before sending to Kafka.', | ||
default: true, | ||
unsafe_hidden: true | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be setting the max batch size too, or is that not needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No Batch size limit as such by kafka.
batch_keys: { | ||
label: 'Batch Keys', | ||
description: 'The keys to use for batching the events.', | ||
type: 'string', | ||
unsafe_hidden: true, | ||
required: false, | ||
multiple: true, | ||
default: ['partition', 'default_partition'] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do these 2 keys do? What other keys are there? Will be doing a control plane migration for this field too?
* Update kafka error handling * Update kafka error handling * add tests * modify error reporting * add tests * add tests * add tests * Update kafka types (#3199) * add metrics to track batch keys * add metrics to track batch keys * Remove reties for kafka client * add test * add topic as batch keys * add topic as batch keys
This pull request updates the Kafka destination integration by improving the batching capabilities and clarifying authentication options. The most significant changes include adding new batching-related fields to the payload and action definition, and removing AWS IAM as a selectable authentication mechanism in the documentation and configuration.
Batching Enhancements:
enable_batching
(boolean) andbatch_keys
(string array) fields to thePayload
interface ingenerated-types.ts
, allowing events to be optionally batched before sending to Kafka.send/index.ts
to support the new batching options, including labels, descriptions, default values, and hiding these fields from the UI by default.Authentication Mechanism Clarification:
mechanism
property in bothgenerated-types.ts
andindex.ts
, leaving only SCRAM, PLAIN, and Client Certificate as options. [1] [2]Screenshots:

Instance: https://app.segment.build/arijit-dev/destinations/actions-kafka/sources/http_api/instances/6880c59b62bcbb1aabdd3887/actions/mQBdMEYYKWsh6Fx2JCQeEt
Note: We need to run a ctl-plane-migration to enable batching as default for kafka.
WIP: https://github.com/segmentio/control-plane/pull/6191
Testing
Include any additional information about the testing you have completed to
ensure your changes behave as expected. For a speedy review, please check
any of the tasks you completed below during your testing.