Skip to content

Releases: Trendyol/quafka

0.2.0

24 Nov 13:06

Choose a tag to compare

🎉 Major Release - Service Pack 1

A significant release with extensive improvements, new features, and architectural enhancements.

⚠️ Breaking Changes

Serialization API Refactoring

  • Removed MessageSerde interface - Split into separate MessageSerializer and MessageDeserializer interfaces for better separation of concerns
  • Removed old JSON serialization classes:
    • JsonMessageSerde
    • ByteArrayJsonMessageSerde
    • StringJsonMessageSerde
  • New JSON API with improved type safety:
    • Use JsonSerializer and JsonDeserializer instead
    • New TypeResolvers for advanced type resolution strategies
    • Builder extensions for easier JSON configuration

Migration Example:

// Old approach (removed)
val serde = JsonMessageSerde<MyType>()

// New approach
val serializer = JsonSerializer<MyType>()
val deserializer = JsonDeserializer<MyType>()

Pipeline Architecture

  • Moved AttributeKey and Attributes from consumer-specific modules to common pipeline module for unified attribute system
  • Pipeline middleware signatures now include richer context with SingleMessageEnvelope and BatchMessageEnvelope
  • Type-safe attribute keys now required for shared state management

Error Handling Configuration

  • Removed FallbackErrorHandler - Replaced with new ResilientHandler for more comprehensive error handling
  • New subscription configuration builder methods for recovery setup
  • Enhanced retry policy configuration with PolicyIdentifier for 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 Attributes API
  • 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 DeserializationException and 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 OutgoingMessageBuilder with 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

  1. Replace JsonMessageSerde with JsonSerializer and JsonDeserializer
  2. Update type resolver configuration to use new TypeResolvers API
  3. Use builder extensions for easier JSON setup

Pipeline Attributes

  1. Import attributes from com.trendyol.quafka.extensions.common.pipelines
  2. Update attribute key definitions to use new type-safe API
  3. Adjust middleware signatures to accept envelope parameters

Error Handling

  1. Replace FallbackErrorHandler usage with ResilientHandler
  2. Update retry configuration to use new builder methods
  3. Review exception handling to leverage policy-based routing

Full Changelog: 0.1.1...0.2.0

0.1.1

23 Oct 05:50

Choose a tag to compare

Full Changelog: 0.1.0-alpha.1...0.1.1

0.1.0-alpha.1

29 Sep 12:41

Choose a tag to compare