Skip to content

Conversation

@vadikko2
Copy link
Owner

@vadikko2 vadikko2 commented Jan 23, 2026

Release Notes - Version 4.6.1

🐛 Bug Fixes

Fixed bootstrap_streaming support for CQRSContainer

Issue: The bootstrap_streaming method did not support CQRSContainer (like DependencyInjectorCQRSContainer), unlike other bootstrap methods (bootstrap for requests, events, and sagas). This caused errors when trying to use DependencyInjectorCQRSContainer with streaming mediators:

'DependencyInjectorCQRSContainer' object has no attribute 'solve'

Fix:

  • Added CQRSContainer support to bootstrap_streaming method, following the same pattern as other bootstrap methods
  • Updated setup_streaming_mediator to accept both DIContainer and CQRSContainer types
  • Added proper type overloads for better type checking
  • The method now correctly handles both di.Container and CQRSContainer instances:
    • If di.Container is provided, it wraps it in DIContainer()
    • If CQRSContainer is provided, it uses it directly

Impact: Users can now use DependencyInjectorCQRSContainer and other CQRSContainer implementations with bootstrap_streaming, enabling dependency injection integration with streaming request handlers.

✅ Testing

  • Added comprehensive test suite for bootstrap_streaming with DependencyInjectorCQRSContainer
  • Tests cover:
    • Basic streaming functionality with dependency injection
    • Event processing with dependency injection
    • Parallel event handling with dependency injection
    • Interface-based dependency resolution

📝 Technical Details

Files Changed:

  • src/cqrs/requests/bootstrap.py: Added CQRSContainer support to bootstrap_streaming and setup_streaming_mediator

New Files:

  • tests/unit/test_bootstrap_streaming_dependency_injector.py: Comprehensive test suite for the new functionality

🔄 Migration Guide

No migration required. This is a backward-compatible bug fix. Existing code using di.Container will continue to work as before. Code using CQRSContainer with bootstrap_streaming will now work correctly.

@DimaPlaz
Copy link
Collaborator

approve

@lukashuk-da
Copy link
Collaborator

Approve

@vadikko2 vadikko2 merged commit 47c2909 into master Jan 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants