Schema Registry policy
Attach a Schema Registry policy to one or more Kafka nodes in a message flow if you want to use an Avro schema to serialize or deserialize the message. The Schema Registry policy contains the connection information for the schema registry from which the Avro schema is retrieved.
You can use the KafkaProducer, KafkaConsumer, and KafkaRead nodes in a message flow to publish, subscribe to, and read messages on a Kafka topic. If you want to use an Avro schema to serialize or deserialize the message, you can use a Schema Registry policy to contain the connection information for the schema registry from which the Avro schema is retrieved.
To attach a Schema Registry policy to a KafkaProducer, KafkaConsumer, or KafkaReadnode, set the Schema Registry policy property of the node to the name of the policy, in the format
{policyProjectName}:policyName
. You must
deploy this policy before the associated message flow is started.
If you redeploy a Schema Registry policy, all message flows that are using the policy will be stopped and restarted.
Property | Property name in .policyxml file | Value |
---|---|---|
Schema registry type | schemaRegistryType | This property sets the type of schema registry to use. The options are "File" and "Confluent API". The default value is "File." |
Schema registry URL | schemaRegistryURL | The URL of the schema registry endpoint (beginning with http:// or https:// for REST access to a schema registry, or file:// for a file-based schema registry). |
Schema registry cache time-to-live | schemaRegistryCacheTTL | This property shows the Schema registry cache time-to-live (in seconds). The default value is 3600. |
Security identity (DSN) | securityIdentity | The Security identity to use when establishing a connection to a Schema Registry with connection type "Confluent API" which requires authentication. |
SSL protocol | sslProtocol | The SSL protocol to use when the connection to a Schema registry is using HTTPS. |
SSL keystore location | sslKeystoreLocation | This property specifies the fully qualified path to the location of the keystore that is to be used when using an SSL connection. If this value is not specified, the keystore that is configured for the integration server is used. |
SSL keystore type | sslKeystoreType | This property specifies the type of keystore that is specified in the SSL keystore location property. Possible values are
JKS and PKCS12 . If this value is not specified, the default value
of JKS is used. |
SSL keystore security identity | sslKeystoreSecurityIdentity | This property specifies the security identity to be used for accessing the keystore. This value is used only if the SSL keystore location property has been specified. |
SSL key security identity | sslKeySecurityIdentity | This property specifies the security identity to be used for accessing the key within the keystore. If this value is not specified, the security identity that is used for accessing the keystore is used. |
SSL truststore location | sslTruststoreLocation | This property specifies the fully qualified path to the location of the truststore that is to be used when using an SSL connection. If this value is not specified, the truststore that is configured for the integration server is used. |
SSL truststore type | sslTruststoreType | This property specifies the type of truststore that is specified in the SSL truststore location property. Possible values are
JKS and PKCS12 . If this value is not specified, the default value
of JKS is used. |
SSL truststore security identity | sslTruststoreSecurityIdentity | This property specifies the security identity to be used for accessing the truststore. This value is used only if the SSL truststore location has been specified. |
Enable SSL certificate hostname checking | sslEnableCertificateHostnameChecking | This property specifies whether the hostname of the Kafka server is to be checked against the
hostname in the Kafka server's certificate. When set to true , the Kafka server
hostname must match the hostname in the Kafka server’s certificate. To disable checking, set this
value to false . |