Skip to content
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

Add support for Buffer types in Kafka Headers #968

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CharlesSwiftConnect
Copy link

The node-rdkafka API accepts Buffers or strings in KafkaHeaders (in line with the librdkafka API), but was converting all Header Values to strings. You can test this by attempting to send a Header value such a Buffer generated from a Uint8 array with values above 127 or including 0s. The first 0 encountered will be treated as a null termination, and bytes above 127 will be spread across multiple array entries, changing the length and values of the uint8 array.

The node-rdkafka API accepts Buffers or strings in KafkaHeaders (in line with the librdkafka API), but was converting all Header Values to strings
@CharlesSwiftConnect
Copy link
Author

created cleaner PR to replace PR #935 (same commit)

@esimphlet
Copy link

Sound great !

@tleasure
Copy link

May I ask when this will be merged? I just ran into the issue and confirmed the patch from @CharlesSwiftConnect allows my buffers to go through correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants