Live Interactive Tester

Kafka Schema Validator

Paste your JSON Schema and a producer payload. Schema Guard intercepts the message and blocks any Poison Pill before it reaches the broker.

JSON Schema Definition

your-schema-v1

Producer Payload

Topic: payment-events
Terminal Output
Waiting for event dispatch…
Synchronous Blocking Validation Resilience4j Circuit Breaker Caffeine Caching Zero Code Changes Required Spring Boot Auto-Configuration

🔌 Integration Guide

Schema Guard uses a Java Dynamic Proxy over the Kafka Producer to intercept messages before they reach the broker. If validation fails, a SchemaValidationException is thrown on the calling thread instantly.

1. Add Maven Dependency

<dependency>
    <groupId>com.schemaguard</groupId>
    <artifactId>schema-guard-spring-boot-starter</artifactId>
    <version>1.0.0</version>
</dependency>

1.1 Add GitHub Packages Repository (Required)

This artifact is published to GitHub Packages (not Maven Central). Add the repository and authenticate Maven.

<repositories>
  <repository>
    <id>github</id>
    <url>https://maven.pkg.github.com/nithinraaj27/kafka-schema-guard</url>
  </repository>
</repositories>

<!-- ~/.m2/settings.xml -->
<settings>
  <servers>
    <server>
      <id>github</id>
      <username>YOUR_GITHUB_USERNAME</username>
      <password>YOUR_GITHUB_TOKEN</password>
    </server>
  </servers>
</settings>

2. Configure application.properties

schema-guard.enabled=true
schema-guard.registry-url=https://api.your-registry.com/schemas
schema-guard.cache-ttl-minutes=60

# Map topics → schema IDs
schema-guard.topics.payment-events=your-schema-v1
schema-guard.topics.order-events=order-schema-v2

✅ Zero code changes in your existing services. Pure Auto-Configuration.