Class GlueSchemaRegistrySerializerImpl

    • Constructor Detail

      • GlueSchemaRegistrySerializerImpl

        public GlueSchemaRegistrySerializerImpl​(software.amazon.awssdk.auth.credentials.AwsCredentialsProvider awsCredentialsProvider,
                                                String region)
        Initialize an instance of GlueSchemaRegistrySerializer with Region.
        Parameters:
        awsCredentialsProvider - AwsCredentialsProvider
      • GlueSchemaRegistrySerializerImpl

        public GlueSchemaRegistrySerializerImpl​(software.amazon.awssdk.auth.credentials.AwsCredentialsProvider awsCredentialsProvider,
                                                GlueSchemaRegistryConfiguration glueSchemaRegistryConfiguration)
        Initialize an instance of GlueSchemaRegistrySerializer with . See documentation for supported configuration entries.
        Parameters:
        awsCredentialsProvider - AwsCredentialsProvider
        glueSchemaRegistryConfiguration - GlueSchemaRegistryConfiguration Configuration object.
    • Method Detail

      • encode

        public byte[] encode​(@Nullable
                             String transportName,
                             Schema schema,
                             byte[] data)
        Converts the given data byte array to be Glue Schema Registry compatible byte array. If the auto-registration setting is turned on, a new schema definitions will be automatically registered. Note that the encoded byte array can only be decoded by a Glue Schema Registry de-serializer (GlueSchemaRegistryDeserializer
        Specified by:
        encode in interface GlueSchemaRegistrySerializer
        Parameters:
        transportName - String Name of the transport channel for the message. This will be used to add metadata to schema. If null, "default-stream" will be used.
        schema - Schema A schema object.
        data - byte array of data that needs to be encoded.
        Returns:
        Encoded Glue Schema Registry compatible byte array.