Skip to main content

Shut down Karapace on invalid schema records

By default, Karapace Schema Registry skips invalid records in the _schemas topic and continues running. Enable strict mode to shut down Karapace when it detects invalid schema records.

Why enable strict mode

Skipping invalid records can hide problems and leave the registry inconsistent. Enable strict mode when data consistency is more important than keeping Schema Registry available after it encounters invalid records.

Enable strict mode

  1. Log in to the Aiven Console, select your project, and choose your Aiven for Apache Kafka® service.
  2. On the Overview page, click Service settings from the sidebar.
  3. Scroll to Advanced configuration and click Configure.
  4. Click Add configuration options.
  5. Find schema_registry_config.schema_reader_strict_mode and set it to Enabled.
  6. Click Save configuration.

What to do if Karapace shuts down

If strict mode stops Karapace because of invalid records in _schemas:

  1. Disable strict mode so Schema Registry can start again and skip invalid records. Use the same Console, CLI, or API steps as in Enable strict mode, and set the option to Disabled or false.
  2. Create a support ticket or email Aiven support so the invalid records can be investigated and fixed.

Related pages