Show / Hide Table of Contents

Class GlueSchemaRegistry

Glue schema registry configuration for a Lambda event source.

Inheritance
object
GlueSchemaRegistry
Implements
ISchemaRegistry
Namespace: Amazon.CDK.AWS.Lambda.EventSources
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class GlueSchemaRegistry : DeputyBase, ISchemaRegistry
Syntax (vb)
Public Class GlueSchemaRegistry Inherits DeputyBase Implements ISchemaRegistry
Remarks

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.Glue;
            using Amazon.CDK.AWS.Lambda.EventSources;

            // Your MSK cluster arn
            string clusterArn;

            Function myFunction;


            // The Kafka topic you want to subscribe to
            var topic = "some-cool-topic";

            // Your Glue Schema Registry
            var glueRegistry = new CfnRegistry(this, "Registry", new CfnRegistryProps {
                Name = "schema-registry",
                Description = "Schema registry for event source"
            });
            myFunction.AddEventSource(new ManagedKafkaEventSource(new ManagedKafkaEventSourceProps {
                ClusterArn = clusterArn,
                Topic = topic,
                StartingPosition = StartingPosition.TRIM_HORIZON,
                ProvisionedPollerConfig = new ProvisionedPollerConfig {
                    MinimumPollers = 1,
                    MaximumPollers = 3
                },
                SchemaRegistryConfig = new GlueSchemaRegistry(new GlueSchemaRegistryProps {
                    SchemaRegistry = glueRegistry,
                    EventRecordFormat = EventRecordFormat.JSON,
                    SchemaValidationConfigs = new [] { new KafkaSchemaValidationConfig { Attribute = KafkaSchemaValidationAttribute.KEY } }
                })
            }));

Synopsis

Constructors

GlueSchemaRegistry(IGlueSchemaRegistryProps)

Glue schema registry configuration for a Lambda event source.

Methods

Bind(IEventSourceMapping, IFunction)

Returns a schema registry configuration.

Constructors

GlueSchemaRegistry(IGlueSchemaRegistryProps)

Glue schema registry configuration for a Lambda event source.

public GlueSchemaRegistry(IGlueSchemaRegistryProps props)
Parameters
props IGlueSchemaRegistryProps
Remarks

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.Glue;
            using Amazon.CDK.AWS.Lambda.EventSources;

            // Your MSK cluster arn
            string clusterArn;

            Function myFunction;


            // The Kafka topic you want to subscribe to
            var topic = "some-cool-topic";

            // Your Glue Schema Registry
            var glueRegistry = new CfnRegistry(this, "Registry", new CfnRegistryProps {
                Name = "schema-registry",
                Description = "Schema registry for event source"
            });
            myFunction.AddEventSource(new ManagedKafkaEventSource(new ManagedKafkaEventSourceProps {
                ClusterArn = clusterArn,
                Topic = topic,
                StartingPosition = StartingPosition.TRIM_HORIZON,
                ProvisionedPollerConfig = new ProvisionedPollerConfig {
                    MinimumPollers = 1,
                    MaximumPollers = 3
                },
                SchemaRegistryConfig = new GlueSchemaRegistry(new GlueSchemaRegistryProps {
                    SchemaRegistry = glueRegistry,
                    EventRecordFormat = EventRecordFormat.JSON,
                    SchemaValidationConfigs = new [] { new KafkaSchemaValidationConfig { Attribute = KafkaSchemaValidationAttribute.KEY } }
                })
            }));

Methods

Bind(IEventSourceMapping, IFunction)

Returns a schema registry configuration.

public virtual IKafkaSchemaRegistryConfig Bind(IEventSourceMapping target, IFunction targetHandler)
Parameters
target IEventSourceMapping
targetHandler IFunction
Returns

IKafkaSchemaRegistryConfig

Remarks

ExampleMetadata: infused

Implements

ISchemaRegistry
Back to top Generated by DocFX