- Overview
- Effector integration
- Dispatch and receive mesh tasks
Dispatch and receive mesh tasks
Use this workflow for cross-terminal tasking: address one task to a configured terminal on another ECN and run a receiver for that task. The wire contract uses a terminal-addressed request keyed by a canonical target terminal UUID. The source terminal UUID supplies the return address; deployment infrastructure, not the SDK, must route the request and response.
Configure terminal identities
Section titled “Configure terminal identities”When ECN_TERMINAL_ID is configured, the SDK serializes that UUID as the task source
for both unprefixed and terminal-addressed dispatch. Omit
ECN_TARGET_TERMINAL_ID for the unprefixed same-ECN path. A supplied target must
differ from the source UUID and selects the exact terminal-addressed request route;
an explicit self-target is rejected before any subscription or publication. The SDK
does not discover or validate a route.
Dispatch one task
Section titled “Dispatch one task”The mesh dispatch example sends one typed request to an explicitly configured target terminal, integration, entity, and command:
python examples/dispatch_mesh_task.py --checkexport ECN_TERMINAL_ID=00000000-0000-4000-8000-000000000011export ECN_TARGET_TERMINAL_ID=00000000-0000-4000-8000-000000000012export ECN_TARGET_ENTITY_ID=00000000-0000-4000-8000-000000000013export ECN_TARGET_INTEGRATION=authorized-receiverexport ECN_TASK_COMMAND=echoexport ECN_TASK_MESSAGE='synthetic message'export ECN_TASK_MODE=completeexport ECN_TASK_TIMEOUT=10python examples/dispatch_mesh_task.pyReceive the task
Section titled “Receive the task”The mesh receiver example registers one exact
entity-and-command handler and prints the validated TaskRequestContext.source:
python examples/receive_mesh_task.py --checkexport ECN_TERMINAL_ID=00000000-0000-4000-8000-000000000012export ECN_ENTITY_ID=00000000-0000-4000-8000-000000000013export ECN_TASK_COMMAND=echoexport ECN_TASK_LIMIT=1python examples/receive_mesh_task.pyInterpret the result
Section titled “Interpret the result”Both examples use only the confirmed MQTT task family and issue at most one request publication. A timeout or caller cancellation removes the local response subscription but does not cancel the remote effect. Use synthetic targets until the deployment owner confirms the exact terminal identifiers, route policy, command allowlist, and broker ACLs.
The examples’ offline checks validate the public request and source models without a network connection. Complete cross-ECN execution remains externally unverified and must not be inferred from the mock.
Continue with Compatibility and limitations.
Version 0.2.0 · branch main
