Skip to content

Integration support for glueSchemaRegistry #206

@jaychapani

Description

@jaychapani

Hi there,

I'm trying to integrate glueSchemaRegistry with Kinesis using KPL/KCL.

Upon debugging the code I came across these lines of code and found that we don't have a way to pass the schema along the UserRecord which is calling KinesisProducer.addUserRecord(). The following piece of code is never execute because of null schema object.

if (schema != null && data != null) {
  if (schema.getSchemaDefinition() == null || schema.getDataFormat() == null) {
      throw new IllegalArgumentException(
          String.format(
              "Schema specification is not valid. SchemaDefinition or DataFormat cannot be null. SchemaDefinition: %s, DataFormat: %s",
              schema.getSchemaDefinition(),
              schema.getDataFormat()
          )
      );
  }
  GlueSchemaRegistrySerializer serializer = glueSchemaRegistrySerializerInstance.get(config);
  byte[] encodedBytes = serializer.encode(stream, schema, data.array());
  data = ByteBuffer.wrap(encodedBytes);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions