diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index 5c43fcf..9fccf6a 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,10 +1,9 @@ [package] org = "ballerinax" name = "confluent.cregistry" -version = "0.4.2" +version = "0.4.3" authors = ["Ballerina"] -export=["confluent.cregistry"] -keywords = ["confluent", "schema_registry", "avro", "serdes"] +keywords = ["schema_registry", "avro", "serdes", "Vendor/Confluent", "Area/Database", "Type/Connector"] repository = "https://github.com/ballerina-platform/module-ballerinax-confluent.cregistry" license = ["Apache-2.0"] distribution = "2201.11.0" @@ -15,8 +14,8 @@ graalvmCompatible = true [[platform.java21.dependency]] groupId = "io.ballerina.lib" artifactId = "schema-registry-native" -version = "0.4.2" -path = "../native/build/libs/confluent.cregistry-native-0.4.2.jar" +version = "0.4.3" +path = "../native/build/libs/confluent.cregistry-native-0.4.3-SNAPSHOT.jar" [[platform.java21.dependency]] groupId = "io.confluent" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index aceb782..bda963c 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -335,7 +335,7 @@ dependencies = [ [[package]] org = "ballerinax" name = "confluent.cregistry" -version = "0.4.2" +version = "0.4.3" dependencies = [ {org = "ballerina", name = "http"}, {org = "ballerina", name = "jballerina.java"}, diff --git a/ballerina/Module.md b/ballerina/Module.md deleted file mode 100644 index 28ec6ee..0000000 --- a/ballerina/Module.md +++ /dev/null @@ -1,63 +0,0 @@ -## Overview - -[Confluent Schema Registry](https://docs.confluent.io/platform/current/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. - -```ballerina -import ballerinax/confluent.cregistry; -``` - -### Step 2: Instantiate a new connector - -```ballerina -configurable string schemaRegistryUrl = ?; -configurable string apiKey = ?; -configurable string apiSecret = ?; -configurable string truststorePath = ?; -configurable string truststorePassword = ?; - -cregistry:Client schemaRegistryClient = check new ( - baseUrl = schemaRegistryUrl, - originals = { - "basic.auth.credentials.source": "USER_INFO", - "basic.auth.user.info": string `${apiKey}:${apiSecret}` - // Truststore configurations are optional when the schema registry's HTTP(S) endpoint is secured with a publicly trusted certificate. - "schema.registry.ssl.truststore.location": truststorePath, - "schema.registry.ssl.truststore.password": truststorePassword, - } -); -``` - -### Step 3: Invoke the connector operation - -You can now utilize the operations available within the connector. - -```ballerina -public 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. - -```bash -bal run -``` diff --git a/ballerina/Package.md b/ballerina/README.md similarity index 100% rename from ballerina/Package.md rename to ballerina/README.md diff --git a/build-config/resources/Ballerina.toml b/build-config/resources/Ballerina.toml index b9e9a5e..558382c 100644 --- a/build-config/resources/Ballerina.toml +++ b/build-config/resources/Ballerina.toml @@ -3,8 +3,7 @@ org = "ballerinax" name = "confluent.cregistry" version = "@toml.version@" authors = ["Ballerina"] -export=["confluent.cregistry"] -keywords = ["confluent", "schema_registry", "avro", "serdes"] +keywords = ["schema_registry", "avro", "serdes", "Vendor/Confluent", "Area/Database", "Type/Connector"] repository = "https://github.com/ballerina-platform/module-ballerinax-confluent.cregistry" license = ["Apache-2.0"] distribution = "2201.11.0"