notify method

void notify(
  1. String action, {
  2. Map<String, dynamic> payload = const {},
})

Pushes a one-way NodeNotify to the hub — no correlation id, no reply.

The fire-and-forget half of the node→hub channel, for telemetry the hub consumes but does not answer (log batches, status snapshots, progress). The hub dispatches it to NodeGateway.onNotify.

Delivery is best-effort: a notify sent while the node is not isReady is dropped, and one lost in a dropping connection is not retried. Use request when the outcome matters.

Implementation

void notify(String action, {Map<String, dynamic> payload = const {}}) {
  final typed = _typed;
  if (typed == null || _state != NodeState.ready || !typed.isOpen) return;
  typed.send(NodeNotify(action, payload: payload));
}