change capture

This commit is contained in:
2026-02-26 14:34:02 -06:00
parent 7ee3604eb1
commit b43495b26d
47 changed files with 5785 additions and 1525 deletions

View File

@@ -46,19 +46,30 @@ Each service declares only the queues it consumes:
**Role:** Orchestrates execution lifecycle, enforces rules, manages inquiries
**Queues Owned:**
- `attune.executor.events.queue`
- Exchange: `attune.events`
- Routing: `event.created`
- Purpose: Sensor-generated events for rule evaluation
- Note: Dedicated queue so the executor only receives `EventCreatedPayload` messages,
not rule lifecycle or pack registration messages that also flow through `attune.events`
- `attune.enforcements.queue`
- Exchange: `attune.executions`
- Routing: `enforcement.#`
- Purpose: Rule enforcement requests
- `attune.execution.requests.queue`
- Exchange: `attune.executions`
- Routing: `execution.requested`
- Purpose: New execution requests
- `attune.execution.status.queue`
- Exchange: `attune.executions`
- Routing: `execution.status.changed`
- Purpose: Execution status updates from workers
- `attune.execution.completed.queue`
- Exchange: `attune.executions`
- Routing: `execution.completed`
- Purpose: Completed execution results
- `attune.inquiry.responses.queue`
- Exchange: `attune.executions`
- Routing: `inquiry.responded`
- Purpose: Human-in-the-loop responses
@@ -92,8 +103,16 @@ Each service declares only the queues it consumes:
**Queues Owned:**
- `attune.events.queue`
- Exchange: `attune.events`
- Routing: `#` (all events)
- Purpose: Events generated by sensors and triggers
- Purpose: Catch-all queue for sensor event monitoring
- Note: Bound with `#` to receive all message types on the events exchange.
The sensor service itself uses `attune.rules.lifecycle.queue` for rule changes
(see RuleLifecycleListener). This queue exists for general event monitoring.
- `attune.rules.lifecycle.queue`
- Exchange: `attune.events`
- Routing: `rule.created`, `rule.enabled`, `rule.disabled`
- Purpose: Rule lifecycle events for starting/stopping sensors
**Setup Method:** `Connection::setup_sensor_infrastructure()`
@@ -147,11 +166,11 @@ Exception:
### Rule Enforcement Flow
```
Event Created
→ `attune.events` exchange
→ `attune.events.queue` (consumed by Executor)
→ `attune.events` exchange (routing: event.created)
→ `attune.executor.events.queue` (consumed by Executor EventProcessor)
→ Rule evaluation
→ `enforcement.created` published to `attune.executions`
→ `attune.enforcements.queue` (consumed by Executor)
→ `attune.enforcements.queue` (consumed by Executor EnforcementProcessor)
```
### Execution Flow
@@ -241,7 +260,8 @@ Access at `http://localhost:15672` (credentials: `guest`/`guest`)
**Expected Queues:**
- `attune.dlx.queue` - Dead letter queue
- `attune.events.queue` - Events (Sensor)
- `attune.events.queue` - Events catch-all (Sensor)
- `attune.executor.events.queue` - Event created only (Executor)
- `attune.enforcements.queue` - Enforcements (Executor)
- `attune.execution.requests.queue` - Execution requests (Executor)
- `attune.execution.status.queue` - Status updates (Executor)