A refused announcement is said, never fatal (hq issue 217)
The raw subscription that answers discovery ran its loop unguarded, so a refusal escaped as an unhandled rejection and ended the process: every per-module container crash-looped on 2026-10-03 over a subscription that only serves the mesh seeing the runtime. It is now caught, logged, and the runtime serves on. Tested against a bus whose permissions refuse the subject; fails without it.
This commit is contained in:
@@ -361,9 +361,18 @@ export async function connectNats(
|
||||
const sub = conn.subscribe(subject);
|
||||
subs.push(sub);
|
||||
void (async () => {
|
||||
for await (const msg of sub) {
|
||||
const body = answer(msg.subject, msg.data);
|
||||
if (body) msg.respond(body);
|
||||
// **A refusal here is said, never fatal** (novox/hq 04-ISSUES/217). This serves discovery —
|
||||
// what the runtime says about itself — not the work; a bus that refuses it costs the mesh
|
||||
// seeing this runtime, not the runtime's tools and handlers. Unhandled, the refusal ended the
|
||||
// process and every per-module container crash-looped on 2026-10-03.
|
||||
try {
|
||||
for await (const msg of sub) {
|
||||
const body = answer(msg.subject, msg.data);
|
||||
if (body) msg.respond(body);
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(`[mesh-tools] the bus refused ${subject}: ${err instanceof Error ? err.message : String(err)}; ` +
|
||||
"discovery will not see this runtime there, and it serves on");
|
||||
}
|
||||
})();
|
||||
return () => sub.unsubscribe();
|
||||
|
||||
Reference in New Issue
Block a user