ballerinax/confluent.cregistry Ballerina library

0.1.0

Overview

Confluent Schema Registry serves as a centralized repository for managing Avro schemas, ensuring data consistency and compatibility in serialization and deserialization processes.

The Ballerina Confluent Schema Registry connector integrates with Confluent's Avro Schema Registry, providing users to efficiently manage schemas within Ballerina applications.

Quickstart

To use the Confluent schema registry connector in your Ballerina project, modify the .bal file as follows.

Step 1: Import the module

Import the ballerinax/confluent.cregistry module into your Ballerina project.

Copy
mport ballerinax/confluent.cregistry;

Step 2: Instantiate a new connector

Copy
onfigurable string baseUrl = ?;
onfigurable int identityMapCapacity = ?;
onfigurable map<anydata> originals = ?;
onfigurable map<string> headers = ?;

registry:Client schemaRegistryClient = check new ({
   baseUrl,
   identityMapCapacity,
   originals,
   headers
);

Step 3: Invoke the connector operation

You can now utilize the operations available within the connector.

Copy
ublic function main() returns error? {
   string schema = string `
       {
           "type": "int",
           "name" : "value", 
           "namespace": "data"
       }`;

   int registerResult = check schemaRegistryClient.register("subject-name", schema);

Step 4: Run the Ballerina application

Use the following command to compile and run the Ballerina program.

Copy
al run

Import

import ballerinax/confluent.cregistry;Copy

Metadata

Released date: about 1 month ago

Version: 0.1.0

License: Apache-2.0


Compatibility

Platform: java17

Ballerina version: 2201.8.6

GraalVM compatible: Yes


Pull count

Total: 432

Current verison: 23


Weekly downloads


Source repository


Keywords

confluent

schema_registry

avro

serdes


Contributors

Other versions

0.1.1

0.1.0