Skip to content

appdevgbb/azure-schema-registry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Azure Schema Registry samples

The Azure Schema Registry provides a repository for developers that wish to store, define and enforce schemas in their distributed applications and services.

Azure Schema Registry

These samples demonstrate how to use the schema registry to encode and decode events. The samples also show how to use the schema registry with Azure Event Hubs when producing and consuming events.

Prerequisites

The following prerequisites are needed to run the samples in this repository:

Console application settings

Settings for both the consumer and producer applications are stored in a local App.config file:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
   <appSettings>
     <add key="EH_NAMESPACE" value="{event-hubs-namespace-name}.servicebus.windows.net"/>
     <add key="EH_NAME" value="{event-hub-name}"/>
     <add key="SCHEMA_GROUP" value="{schema-group-name}"/>
     <add key="SCHEMA_REGISTRY_URL" value="{event-hubs-namespace-name}.servicebus.windows.net"/>
   </appSettings>
</configuration>

To specify the application identity for Azure SDK client credentials, add the following to the <appSettings> element:

     <add key="AZURE_TENANT_ID" value="{azure-tenant-id}"/>
     <add key="AZURE_CLIENT_ID" value="{application-client-id}"/>
     <add key="AZURE_CLIENT_SECRET" value="{application-client-secret}"/>

Azure Functions settings

Function settings for local.settings.json when using Managed Identity or local developer account credentials:

{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "UseDevelopmentStorage=true",
    "FUNCTIONS_WORKER_RUNTIME": "dotnet",
    "EventHubsConnection__fullyQualifiedNamespace": "{event-hubs-connection-string}.servicebus.windows.net",
    "EventHubName": "{event-hub-name}",
    "SchemaGroup": "{schema-group-name}",
    "SchemaRegistryUrl": "{event-hubs-namespace-name}.servicebus.windows.net",
  }
}

To specify the application identity for Azure SDK client and Azure Function bindings credentials, add the following elements to the Values object:

    "EventHubsConnection__tenantId": "{azure-tenant-id}",
    "EventHubsConnection__clientId": "{application-client-id}",
    "EventHubsConnection__clientSecret": "{application-client-secret}",
    "AZURE_TENANT_ID": "{azure-tenant-id}",
    "AZURE_CLIENT_ID": "{application-client-id}",
    "AZURE_CLIENT_SECRET": "{application-client-secret}"

Azure Functions in an isolated process

Functions that run in an isolated process have the same settings except for the worker runtime value:

"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated"

References

About

Azure Schema Registry samples and demos

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published