Introduction
What is Solace Schema Registry JSON Schema SERDES for .NET?
Solace Schema Registry JSON Schema SERDES for .NET is a library that provides schema-aware serialization and deserialization capabilities for Solace messaging applications. It integrates with Solace Schema Registry to enable schema resolution, validation, and data transformation for JSON Schema format.
Key Concepts
Solace Schema Registry Integration
The library connects to Solace Schema Registry to fetch and manage schemas. Schemas are identified by artifact references (group ID, artifact ID, and version) and are resolved during serialization/deserialization.
Artifact References
An artifact reference uniquely identifies a schema in the registry:
- Group ID: Logical grouping of related schemas
- Artifact ID: Unique identifier for the schema within a group
- Version: Specific version of the schema
Schema Resolution Strategies
The library supports multiple strategies for resolving schemas:
- Explicit artifact reference: Provide the exact schema reference
- Solace Topic ID: Use topic profiles to map topics to schemas
- Destination-based resolution: Use the destination name as the artifact ID for schema lookup
Package Structure
The library is organized into two packages:
Solace.SchemaRegistry.Serdes.Core
Core abstractions and infrastructure:
- Schema Registry client for API communication
- Base serializer/deserializer abstractions
- Schema resolver interfaces
- Artifact reference handling
Solace.SchemaRegistry.Serdes.JsonSchema
JSON Schema-specific implementation:
JsonSchemaSerializer<T>: Serializes .NET objects to JSON with schema validationJsonSchemaDeserializer<T>: Deserializes JSON to .NET objects with schema validation- JSON Schema parsing and validation
Why Use This Library?
Schema Validation
- Compile-time safety: Catch schema mismatches early
- Runtime validation: Ensure data conforms to expected schemas
Solace Schema Registry Integration
- Centralized schema management: Store and version schemas in Solace Schema Registry
- Schema resolution: Fetch schemas from the registry using artifact references
- Schema caching: Efficient schema retrieval with built-in caching
Broad Compatibility
- Target framework: .NET Standard 2.0 for maximum compatibility
- Solace integration: Works seamlessly with Solace Messaging API for .NET