-
Couldn't load subscription status.
- Fork 165
Description
Hi,
I am using confluent and kafka-connect-oracle and i can see schema content by using schema registry api such as "curl -X GET http://localhost:8081/schemas/ids/44" :
{"subject":"TEST.KAFKAUSER.TEST-value","version":1,"id":44,"schema":"{\"type\":\"record\",\"name\":\"row\",\"namespace\":\"test.kafkauser.test\",\"fields\":[{\"name\":\"SCN\",\"type\":\"long\"},{\"name\":\"SEG_OWNER\",\"type\":\"string\"},{\"name\":\"TABLE_NAME\",\"type\":\"string\"},{\"name\":\"TIMESTAMP\",\"type\":{\"type\":\"long\",\"connect.version\":1,\"connect.name\":\"org.apache.kafka.connect.data.Timestamp\",\"logicalType\":\"timestamp-millis\"}},{\"name\":\"SQL_REDO\",\"type\":\"string\"},{\"name\":\"OPERATION\",\"type\":\"string\"},{\"name\":\"data\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"value\",\"namespace\":\"\",\"fields\":[{\"name\":\"ID\",\"type\":[\"null\",\"double\"],\"default\":null},{\"name\":\"NAME\",\"type\":[\"null\",\"string\"],\"default\":null}],\"connect.name\":\"value\"}],\"default\":null},{\"name\":\"before\",\"type\":[\"null\",\"value\"],\"default\":null}],\"connect.name\":\"test.kafkauser.test.row\"}","deleted":false}
However this schema cannot be parsed by confluent's schema registry in python :
schemaRegistryClientURL="http://localhost:8081"
from confluent.schemaregistry.client import CachedSchemaRegistryClient
from confluent.schemaregistry.serializers import MessageSerializer
schema_registry_client= CachedSchemaRegistryClient(url=schemaRegistryClientURL)
schema_registry_client.get_by_id(44)
Traceback (most recent call last):
File "", line 1, in
File "build/bdist.linux-x86_64/egg/confluent/schemaregistry/client/CachedSchemaRegistryClient.py", line 140, in get_by_id
confluent.schemaregistry.client.ClientError: Received bad schema from registry.
Thanks.