Skip to content

confluentinc/libschemaregistry

Repository files navigation

C++ Schema Registry Client Library

A C++ client library for interacting with Confluent Schema Registry.

The library

libschemaregistry provides a Schema Registry client, along with serdes (serializers/deserializers) for Avro, Protobuf, and JSON Schema.

Features

  • Support for Avro, Protobuf, and JSON Schema formats
  • Data quality rules using Google Common Expression Language (CEL) expressions
  • Schema migration rules using JSONata expressions
  • Client-side field-level encryption (CSFLE) rules using AWS KMS, Azure Key Vault, Google Cloud KMS, or HashiCorp Vault

This library can be used with librdkafka but does not depend on it.

Serdes

  • [AvroSerializer] and [AvroDeserializer] - serdes that use avro-cpp
  • [ProtobufSerializer] and [ProtobufDeserializer] - serdes that use protobuf
  • [JsonSerializer] and [JsonDeserializer] - serdes that use jsoncons

Build

Prerequisites

  • C++17 compatible compiler (C++20 is required for data quality rules on Windows)
  • Java 11 (for the Antlr parser)
  • CMake 3.22+
  • Ninja
  • vcpkg

To build, first install vcpkg. Next, run CMake as follows:

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -G Ninja -DCMAKE_TOOLCHAIN_FILE="${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
cmake --build build -j
cmake --install build --prefix /usr/local

CMake usage

find_package(schemaregistry CONFIG REQUIRED)
target_link_libraries(myapp PRIVATE schemaregistry::schemaregistry)

This project installs a CMake package called schemaregistry. The installed target is exported under the schemaregistry:: namespace. In the build tree, an alias with the same namespace is provided for consistency.

Examples

You can find examples in the example folder.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •