Class ConfluentRegistryAvroSerializationSchema<T>

    • Method Detail

      • forSpecific

        public static <T extends org.apache.avro.specific.SpecificRecord> ConfluentRegistryAvroSerializationSchema<T> forSpecific​(Class<T> tClass,
                                                                                                                                  String subject,
                                                                                                                                  String schemaRegistryUrl)
        Creates AvroSerializationSchema that produces byte arrays that were generated from Avro schema and writes the writer schema to Confluent Schema Registry.
        Parameters:
        tClass - the type to be serialized
        subject - subject of schema registry to produce
        schemaRegistryUrl - URL of schema registry to connect
        Returns:
        serialized record
      • forSpecific

        public static <T extends org.apache.avro.specific.SpecificRecord> ConfluentRegistryAvroSerializationSchema<T> forSpecific​(Class<T> tClass,
                                                                                                                                  String subject,
                                                                                                                                  String schemaRegistryUrl,
                                                                                                                                  @Nullable
                                                                                                                                  Map<String,​?> registryConfigs)
        Creates AvroSerializationSchema that produces byte arrays that were generated from Avro schema and writes the writer schema to Confluent Schema Registry.
        Parameters:
        tClass - the type to be serialized
        subject - subject of schema registry to produce
        schemaRegistryUrl - URL of schema registry to connect
        registryConfigs - map with additional schema registry configs (for example SSL properties)
        Returns:
        serialized record
      • forGeneric

        public static ConfluentRegistryAvroSerializationSchema<org.apache.avro.generic.GenericRecord> forGeneric​(String subject,
                                                                                                                 org.apache.avro.Schema schema,
                                                                                                                 String schemaRegistryUrl)
        Creates AvroSerializationSchema that produces byte arrays that were generated from Avro schema and writes the writer schema to Confluent Schema Registry.
        Parameters:
        subject - subject of schema registry to produce
        schema - schema that will be used for serialization
        schemaRegistryUrl - URL of schema registry to connect
        Returns:
        serialized record
      • forGeneric

        public static ConfluentRegistryAvroSerializationSchema<org.apache.avro.generic.GenericRecord> forGeneric​(String subject,
                                                                                                                 org.apache.avro.Schema schema,
                                                                                                                 String schemaRegistryUrl,
                                                                                                                 @Nullable
                                                                                                                 Map<String,​?> registryConfigs)
        Creates AvroSerializationSchema that produces byte arrays that were generated from Avro schema and writes the writer schema to Confluent Schema Registry.
        Parameters:
        subject - subject of schema registry to produce
        schema - schema that will be used for serialization
        schemaRegistryUrl - URL of schema registry to connect
        registryConfigs - map with additional schema registry configs (for example SSL properties)
        Returns:
        serialized record