confluentinc / confluentinc/ksql

Cannot create new stream & topic with Avro key (Schema for message keys on topic … does not exist in the Schema Registry)

Open
#7,204 1 comment 0 reactions 0 assignees View on GitHub
awaiting-info bug round-robin streaming-engine
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.