Releases: Trendyol/quafka
Releases · Trendyol/quafka
0.2.0
🎉 Major Release - Service Pack 1
A significant release with extensive improvements, new features, and architectural enhancements.
⚠️ Breaking Changes
Serialization API Refactoring
- Removed
MessageSerdeinterface - Split into separateMessageSerializerandMessageDeserializerinterfaces for better separation of concerns - Removed old JSON serialization classes:
JsonMessageSerdeByteArrayJsonMessageSerdeStringJsonMessageSerde
- New JSON API with improved type safety:
- Use
JsonSerializerandJsonDeserializerinstead - New
TypeResolversfor advanced type resolution strategies - Builder extensions for easier JSON configuration
- Use
Migration Example:
// Old approach (removed)
val serde = JsonMessageSerde<MyType>()
// New approach
val serializer = JsonSerializer<MyType>()
val deserializer = JsonDeserializer<MyType>()Pipeline Architecture
- Moved
AttributeKeyandAttributesfrom consumer-specific modules to common pipeline module for unified attribute system - Pipeline middleware signatures now include richer context with
SingleMessageEnvelopeandBatchMessageEnvelope - Type-safe attribute keys now required for shared state management
Error Handling Configuration
- Removed
FallbackErrorHandler- Replaced with newResilientHandlerfor more comprehensive error handling - New subscription configuration builder methods for recovery setup
- Enhanced retry policy configuration with
PolicyIdentifierfor better routing
✨ New Features
Batch Pipeline Support
- New batch message pipeline handler - Apply middleware patterns to batch message processing
- SingleMessagePipelineAdapter - Reuse single-message middleware in batch contexts
- Support for shared state across batch processing with
AttributesAPI - Batch-aware middleware with
BatchMessageEnvelope
Advanced Retry & Error Handling
- Policy-based retry system - Configure different retry strategies per exception type or condition
- Enhanced retry policies with exponential backoff, max attempts, and custom logic
- Topic-based retry configuration - Advanced routing and topic management for failed messages
- In-memory retry improvements - Better transient failure handling
Resilient Message Handler
- New
ResilientHandler- Automatic retry and error recovery for message processing - Built-in support for fatal and cancellation exceptions
- Configurable retry strategies and fallback behaviors
JSON Deserialization Enhancements
- Rich deserialization results with
DeserializationResult- Handle success, partial failures, and errors - Multiple type resolution strategies:
- Header-based type resolution
- Package-based type resolution
- Custom mapping-based resolution
- Better error handling with
DeserializationExceptionand detailed error context
Pipeline Improvements
- Unified attribute system - Type-safe shared state management across all pipeline types
- PipelineBuilder - Fluent API for constructing complex middleware chains
- Better middleware composition - Enhanced extension functions for pipeline building
Enhanced Consumer Builders
- New configuration options in
QuafkaConsumerBuilder - Improved subscription builder with recovery configuration support
- Better backpressure configuration API
Enhanced Producer Builders
- Improved
OutgoingMessageBuilderwith better header management - Enhanced batch publishing support
- Better error handling and delivery result tracking
🐛 Bug Fixes
- Fixed exception handling - Now properly re-throws fatal and cancelled exceptions to prevent silent failures
- Improved error logging - Better context and error messages throughout the library
- Various edge case fixes in error handling and retry mechanisms
📖 Documentation
- New comprehensive guides:
- Complete batch consumer examples guide
- Detailed single consumer patterns guide
- Producer patterns and best practices guide
- In-depth retry mechanisms documentation
- Interactive console demo - Updated with 12+ working examples for producers and consumers
- Enhanced README - Better feature descriptions, comparison tables, and quick start guides
- Pipeline architecture guide - Detailed documentation for batch pipeline middleware
🔧 Improvements
- Better type safety - Enhanced generic type handling throughout the codebase
- Improved builder APIs - More intuitive and consistent configuration
- Enhanced event system - New event types for better observability
- Utility additions - Common extension functions, charset utilities, and header helpers
- GitHub Actions workflow - Automated Dokka documentation publishing
🔗 Migration Guide
Serialization
- Replace
JsonMessageSerdewithJsonSerializerandJsonDeserializer - Update type resolver configuration to use new
TypeResolversAPI - Use builder extensions for easier JSON setup
Pipeline Attributes
- Import attributes from
com.trendyol.quafka.extensions.common.pipelines - Update attribute key definitions to use new type-safe API
- Adjust middleware signatures to accept envelope parameters
Error Handling
- Replace
FallbackErrorHandlerusage withResilientHandler - Update retry configuration to use new builder methods
- Review exception handling to leverage policy-based routing
Full Changelog: 0.1.1...0.2.0
0.1.1
Full Changelog: 0.1.0-alpha.1...0.1.1