Enable shutdown of Karapace for invalid schema records
You can configure the Karapace schema registry to shut down when corrupt schema records are detected in the _schemas
topic.
Why enable Karapace to shutdown
By default, Karapace skips invalid schema records to prevent interruptions. To ensure
data consistency, you can enable schema_reader_strict_mode
to shut down Karapace when
it detects faulty records. This ensures that only valid schemas are processed,
preventing data integrity issues.
What to do if Karapace shuts down
-
Contact Aiven support: If Karapace shuts down due to corrupt schema records, create a support ticket or email Aiven support.
-
Disable strict mode: You can also disable
schema_reader_strict_mode
to allow Karapace to continue running while skipping faulty records.
Enable Karapace shutdown
- Console
- CLI
- API
-
Log in to the Aiven Console, select your project, and choose your Aiven for Apache Kafka® service.
-
On the Overview page, click Service settings from the sidebar.
-
Scroll to Advanced configuration and click Configure.
-
Click Add configuration options.
-
Find
schema_registry_config.schema_reader_strict_mode
and set it to Enabled. -
Click Save configuration.
Enable shutdown of Karapace using the Aiven CLI:
aiven service update \
--project PROJECT_NAME \
--service SERVICE_NAME \
--user-config schema_reader_strict_mode=true
Parameters:
PROJECT_NAME
: Name of your project in Aiven.SERVICE_NAME
: Name of your Aiven for Apache Kafka® service.--user-config schema_reader_strict_mode=true
: Enables the shutdown of Karapace when it detects corrupt schema records.
Enable shutdown of Karapace using the Aiven API.
curl -X PUT \
-H "Authorization: Bearer <token>" \
-d '{"user_config": {"schema_reader_strict_mode": true}}' \
https://api.aiven.io/v1/project/PROJECT_NAME/service/SERVICE_NAME
Parameters:
PROJECT_NAME
: Name of your project in Aiven.SERVICE_NAME
: Name of your Aiven for Apache Kafka® service.Authorization: Bearer <token>
: Your API authentication token."user_config": {"schema_reader_strict_mode": true}
: Enables the shutdown of Karapace when it detects corrupt schema records.