Expand description
§Loopback Transport Implementation
This module provides a loopback transport implementation for testing and development scenarios where multiple middleware instances need to communicate within a single process or test environment. It simulates network communication by routing M2M requests directly to local middleware instances.
§Features
- In-Process Communication: Routes calls directly to registered middleware instances
- Network Simulation: Supports configurable delays and jitter to simulate network latency
- Test Orchestration: Provides utilities for spawning multiple middleware instances
- Resource Pre-enrollment: Supports pre-populating middleware with test resources
§Use Cases
- Unit and integration testing of distributed traceability scenarios
- Development and debugging of multi-node workflows
- Performance testing with controlled network conditions
- Simulation of distributed systems in a single process
§Network Simulation
The loopback transport can simulate network characteristics by introducing configurable delays and jitter to M2M calls, allowing testing of timeout handling and performance under various network conditions.
Structs§
- M2mLoopback
- Loopback transport service for in-process M2M communication.
Functions§
- spawn_
loopback_ middlewares - Spawns multiple loopback middleware instances with no pre-enrolled resources.
- spawn_
loopback_ middlewares_ with_ enrolled_ resources - Spawns multiple loopback middleware instances with pre-enrolled test resources.
- spawn_
loopback_ middlewares_ with_ entropy - Spawns loopback middleware instances with network simulation and pre-enrolled resources.