Skip to content

feat(routing): M1.2.6 Message Routing Middleware (#205)#205

Merged
LyeZinho merged 6 commits intomainfrom
feature/M1.2.6-message-routing-middleware
Apr 17, 2026
Merged

feat(routing): M1.2.6 Message Routing Middleware (#205)#205
LyeZinho merged 6 commits intomainfrom
feature/M1.2.6-message-routing-middleware

Conversation

@LyeZinho
Copy link
Copy Markdown
Member

Summary

  • Implement M1.2.6: Message routing middleware with MQTT-style topic-based dispatch
  • Key features: Topic/pattern validation, wildcard matching (* and #), thread-safe handler registration
  • Test coverage: 19 unit tests + 5 integration tests (37/37 pass)
  • Code quality: fmt ✓, clippy ✓, build ✓

Commits

  • feat(routing): Define RoutingError enum with Display trait
  • docs: Add M1.2.6 message routing middleware design document
  • docs: Add M1.2.6 message routing implementation plan
  • feat(routing): Add Topic, TopicPattern, MessageRouter with wildcard matching and 18 tests
  • test(integration): Add comprehensive routing integration tests with threading and hierarchy
  • fix(routing): Use or_default() instead of or_insert_with(Vec::new) per clippy

Design

Message routing implements MQTT-style topic hierarchies with pattern matching:

  • Topics: mimi/commands/*, mimi/events/*, mimi/memory/*, etc.
  • Patterns: exact, * (single level), # (multi-level end-only)
  • Thread-safe: Arc<Mutex<HashMap<String, Vec>>>
  • Fan-out: Failed handlers logged but don't block other handlers

Async handlers documented as M1.3+ future work.

@LyeZinho LyeZinho merged commit 0cfe5c9 into main Apr 17, 2026
6 checks passed
@LyeZinho LyeZinho deleted the feature/M1.2.6-message-routing-middleware branch April 17, 2026 16:41
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.

1 participant