Class QNodeRoles
java.lang.Object
com.kingsrook.qqq.backend.core.cluster.QNodeRoles
What this node of a multi-node application does (docs/specs/
2026-10-15-cluster-ha-design.md, section A). Core stays orchestrator-agnostic:
roles come from the environment (or system properties), read once.
QQQ_NODE_ROLES (qqq.node.roles): comma list of web, worker, scheduler, esb, or
"all" (the default - a single node does everything, as before). Explicit
per-feature flags win over the role list:
- QQQ_HTTP_ENABLED (qqq.http.enabled): serve application routes (probes and
metrics are always served);
- QQQ_SCHEDULE_MANAGER_ENABLED (qqq.scheduleManager.enabled): start schedulers;
- QQQ_ESB_TRIGGERS_ENABLED (qqq.esb.triggers.enabled): run ESB trigger consumers;
- QQQ_JOBS_WORKER_THREADS (qqq.jobs.workerThreads): durable job worker threads
(without it, a node without the worker role runs 0).
The node id is QQQ_NODE_ID, else HOSTNAME (the pod name), else the host name.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumA node role.static final recordThe resolved settings of this node. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic QNodeRoles.Settingsget()This node's settings, resolved on first use.static booleanhas(QNodeRoles.Role role) Shorthand: whether this node has the role.static StringnodeId()Shorthand: this node's id.static voidset(QNodeRoles.Settings newSettings) Replace the settings (tests, or an app that assigns roles itself before the server starts).
-
Field Details
-
ENV_ROLES
- See Also:
-
ENV_HTTP
- See Also:
-
ENV_SCHEDULER
- See Also:
-
ENV_ESB_TRIGGERS
- See Also:
-
ENV_WORKER_THREADS
- See Also:
-
ENV_NODE_ID
- See Also:
-
-
Method Details
-
get
This node's settings, resolved on first use. -
set
Replace the settings (tests, or an app that assigns roles itself before the server starts). Null re-reads the environment on next use. -
nodeId
Shorthand: this node's id. -
has
Shorthand: whether this node has the role.
-