We had migrated the Schema Registry from one EKS to another EKS. We had earlier taken a dump of “_schemas” topic data to a text file. Like this:
kafka-console-consumer \
--from-beginning \
--topic _schemas \
--bootstrap-server source-broker:9092 \
--property print.key=true \
--property key.separator=### > schemas_dump.txt
We wrote a python script that reads the text file “schemas_dump.txt” line by line and does a POST request to new Schema Registry URL to dump the data.
The POST command is something like this below -
curl --location 'http://SHCHEMA_REGISRTY_URL_elb.amazonaws.com/subjects/example.source.abandon_cart-value/versions/' \
--header 'Content-Type: application/vnd.schemaregistry.v1+json' \
--data '{"schema":"{\"type\":\"record\",\"name\":\"FlatEvent\",\"namespace\":\"com.example.map.cartabandon.model\",\"fields\":[{\"name\":\"eventType\",\"type\":\"string\"},{\"name\":\"eventGuid\",\"type\":{\"type\":\"string\",\"logicalType\":\"uuid\"}},{\"name\":\"deviceId\",\"type\":\"string\"},{\"name\":\"customerId\",\"type\":\"string\"},{\"name\":\"dataTime\",\"type\":\"long\"},{\"name\":\"deviceDateTime\",\"type\":\"long\"},{\"name\":\"dateTime\",\"type\":\"long\"},{\"name\":\"itemId\",\"type\":\"long\"},{\"name\":\"cartId\",\"type\":\"long\"},{\"name\":\"productId\",\"type\":\"long\"},{\"name\":\"qty\",\"type\":\"int\"},{\"name\":\"siteId\",\"type\":[\"null\",\"int\"]}]}","deleted":false}
}'
After completion of the python script, the schema IDs got changed. Please help here as to how the schema ID got changed here? It was not the same from old schema IDs.
Please help me understand how the Schema IDs got changed. It will be highly appreciated.