confluentinc / confluentinc/ksql
Cannot create new stream & topic with Avro key (Schema for message keys on topic … does not exist in the Schema Registry)
- Dominant language
- Java
- Stars
- 315
- Forks
- 1k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 36
Description
ksqlDB 0.15
Creating a new steam with new topic and Avro *value* works:
```
ksql> CREATE STREAM FOO (KEY_COL VARCHAR, COL1 INT, COL2 VARCHAR)
> WITH (KAFKA_TOPIC='FOO', PARTITIONS=1, REPLICAS=1, VALUE_FORMAT='AVRO');
Message
----------------
Stream created
----------------
```
But if I try to use Avro for the key it fails
```
ksql> CREATE STREAM FOO2 (KEY_COL VARCHAR, COL1 INT, COL2 VARCHAR)
> WITH (KAFKA_TOPIC='FOO2', PARTITIONS=1, REPLICAS=1, KEY_FORMAT='AVRO', VALUE_FORMAT='AVRO');
Schema for message keys on topic FOO2 does not exist in the Schema Registry.Subject: FOO2-key
Possible causes include:
- The topic itself does not exist -> Use SHOW TOPICS; to check
- Messages on the topic are not serialized using a format Schema Registry supports -> Use PRINT 'FOO2' FROM BEGINNING; to verify
- Messages on the topic have not been serialized using a Confluent Schema Registry supported serializer -> See https://docs.confluent.io/current/schema-registry/docs/serializer-formatter.html
- The schema is registered on a different instance of the Schema Registry -> Use the REST API to list available subjects https://docs.confluent.io/current/schema-registry/docs/api.html#get--subjects
- You do not have permissions to access the Schema Registry.Subject: FOO2-key -> See https://docs.confluent.io/current/schema-registry/docs/security.html
ksql> CREATE STREAM FOO2 (KEY_COL VARCHAR, COL1 INT, COL2 VARCHAR)
> WITH (KAFKA_TOPIC='FOO2', PARTITIONS=1, REPLICAS=1, FORMAT='AVRO');
Schema for message keys on topic FOO2 does not exist in the Schema Registry.Subject: FOO2-key
Possible causes include:
- The topic itself does not exist -> Use SHOW TOPICS; to check
- Messages on the topic are not serialized using a format Schema Registry supports -> Use PRINT 'FOO2' FROM BEGINNING; to verify
- Messages on the topic have not been serialized using a Confluent Schema Registry supported serializer -> See https://docs.confluent.io/current/schema-registry/docs/serializer-formatter.html
- The schema is registered on a different instance of the Schema Registry -> Use the REST API to list available subjects https://docs.confluent.io/current/schema-registry/docs/api.html#get--subjects
- You do not have permissions to access the Schema Registry.Subject: FOO2-key -> See https://docs.confluent.io/current/schema-registry/docs/security.html
```
Contributor guide
Assessment
This issue has not been assessed yet.