Skip to content

[FEATURE] Kafka: add schema compatibility field to message binding #304

Description

@ivangsa

Why do we need this improvement?

When using a schema registry, the compatibility mode is part of the contract
between producers and consumers. There is currently no way to document it in
an AsyncAPI message binding.

How will this change help?

Teams reading the AsyncAPI document know immediately what compatibility
guarantee the schema is registered under. Tooling that registers schemas
from AsyncAPI documents can apply the correct compatibility setting without
external configuration.

Screenshots

No response

How could it be implemented/designed?

Add a compatibility field to the Message Binding Object.

Field Name Type Description Applicability [default] Constraints
compatibility string The schema compatibility mode used when registering this schema. OPTIONAL MUST be one of BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE, NONE
messages:
  PaymentEvent:
    bindings:
      kafka:
        schemaIdLocation: 'payload'
        schemaLookupStrategy: 'TopicNameStrategy'
        compatibility: 'BACKWARD'
        bindingVersion: '0.6.0'

The enum values follow the compatibility types defined by Confluent Schema
Registry and supported by Apicurio Registry and Karapace.

🚧 Breaking changes

No

👀 Have you checked for similar open issues?

  • I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue?

Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions