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

SerializationContext #1238

Open
Severus1992 opened this issue Apr 6, 2020 · 2 comments · May be fixed by #2311
Open

SerializationContext #1238

Severus1992 opened this issue Apr 6, 2020 · 2 comments · May be fixed by #2311

Comments

@Severus1992
Copy link

Hello! You are planning a transition to a new Serialization context with IBufferWritter and DeserializationContext with ReadOnlySequence for zero-allocation ?

@mhowlett
Copy link
Contributor

mhowlett commented Apr 6, 2020

we aren't planning to prioritize this in the near future. if you have a specific recommendation, feel free to open a PR to demonstrate the suggested API. this would be a breaking change, and would require a version bump to 2.0.

@nmosafi
Copy link

nmosafi commented Sep 19, 2023

Given confluent-kafka-dotnet is wrapping librdkafka I am not sure how feasible this suggestion is.

An approach which could work would be to change ISerializer and IAsyncSerializer to return ArraySegment<byte> rather than byte[]. This would at least allow apps to use pooled arrays or circular buffers, to achieve something closer to zero-allocation serialization when publishing to Kafka. The ArraySegment can easily map to a call to SafeKafkaHandle.Produce which accepts an array, an offset and a length

@verdie-g verdie-g linked a pull request Nov 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants