Skip to content

Refactor Fluvio C++ Client API to Modern Object-Oriented Design with Updated Rust Internals and C API#4

Merged
stefanDeveloper merged 5 commits into
ASTRAOS-de:mainfrom
KunoVonHagen:main
Jun 1, 2026
Merged

Refactor Fluvio C++ Client API to Modern Object-Oriented Design with Updated Rust Internals and C API#4
stefanDeveloper merged 5 commits into
ASTRAOS-de:mainfrom
KunoVonHagen:main

Conversation

@KunoVonHagen
Copy link
Copy Markdown
Collaborator

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 on Fluvio, FluvioAdmin, TopicProducerPool, and FluvioStream classes. For example, Fluvio::connect(), client->topic_producer(...), producer->send(...), and stream->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., FluvioClientFluvio, FluvioProducerTopicProducerPool, FluvioRecordRecord) 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:

  • Updated the C API to use new types and methods, and simplified configuration handling by removing the wrapper struct in favor of direct use of FluvioConfig. All related functions and memory management routines were updated accordingly. [1] [2] [3]

Other Improvements:

  • Minor build and workflow improvements in documentation (e.g., adding cd .. after tests).

These changes collectively modernize the C++ client API, making it more maintainable and easier for users to understand and use.

@stefanDeveloper stefanDeveloper self-requested a review June 1, 2026 12:52
@stefanDeveloper stefanDeveloper added the enhancement New feature or request label Jun 1, 2026
Copy link
Copy Markdown
Member

@stefanDeveloper stefanDeveloper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good from my side.

@stefanDeveloper
Copy link
Copy Markdown
Member

Keep in mind that we have to update https://github.com/stefanDeveloper/zeek-fluvio

@stefanDeveloper stefanDeveloper merged commit e73ccfb into ASTRAOS-de:main Jun 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants