Refactor Fluvio C++ Client API to Modern Object-Oriented Design with Updated Rust Internals and C API#4
Merged
Conversation
Refactor Fluvio C++ Client API to Modern Object-Oriented Design with Updated Rust Internals and C API
stefanDeveloper
approved these changes
Jun 1, 2026
Member
stefanDeveloper
left a comment
There was a problem hiding this comment.
Looks good from my side.
Member
|
Keep in mind that we have to update https://github.com/stefanDeveloper/zeek-fluvio |
Closed
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.
This pull request refactors the C++ client API for Fluvio to provide a more idiomatic, object-oriented interface, aligning it with the original Fluvio client. The changes affect both the Rust internals and the C++/C API surface, and update all documentation and examples to use the new API. The result is a cleaner, more intuitive experience for C++ users, with improved consistency and maintainability.
API Refactoring and Object-Oriented Interface:
Replaced procedural C-style functions (e.g.,
fluvio_connect,create_producer,producer_send) with object-oriented methods onFluvio,FluvioAdmin,TopicProducerPool, andFluvioStreamclasses. For example,Fluvio::connect(),client->topic_producer(...),producer->send(...), andstream->next()are now used throughout the API and examples. [1] [2] [3] [4] [5]Updated the internal Rust implementation to match the new API, renaming types and methods (e.g.,
FluvioClient→Fluvio,FluvioProducer→TopicProducerPool,FluvioRecord→Record) and moving procedural functions to associated methods. [1] [2]Documentation and Examples:
Revised all documentation (
README.md,examples/README.md) to use the new object-oriented API, including code snippets and explanations. Added an API mapping section for clarity. [1] [2] [3] [4] [5] [6]Refactored example programs (
examples/producer.cpp,examples/consumer.cpp) to use the new API, improving readability and demonstrating best practices. [1] [2] [3]C API and Configuration:
FluvioConfig. All related functions and memory management routines were updated accordingly. [1] [2] [3]Other Improvements:
cd ..after tests).These changes collectively modernize the C++ client API, making it more maintainable and easier for users to understand and use.