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

Added new IProducer.ProduceAsync overload for produce with minimal allocations #2367

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

UBSaxo
Copy link

@UBSaxo UBSaxo commented Nov 26, 2024

This PR adds new IProducer as new base interface for IProducer<TKey, TValue>. New interface has single ProduceAsync method that takes all message properties as primitive types include the key and value as pre-serialized bytes.

Compared to existing produce flows this changes:

  1. Lets caller serialize key and value up front allowing caller to reuse buffers etc.
  2. Avoids the wrapping of all message properties in a temporary Message instance.
  3. Avoids the wrapping of produce result properties in an allocated class.

@confluent-cla-assistant
Copy link

confluent-cla-assistant bot commented Nov 26, 2024

🎉 All Contributor License Agreements have been signed. Ready to merge.
✅ UBSaxo
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

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.

1 participant