{"record":{"id":"3883a99615ed5dc4","repo":"apache/beam","slug":"unable-to-find-inbound-timer-receiver-for-instruction-s","errorCode":null,"errorMessage":"Unable to find inbound timer receiver for instruction %s, transform %s, and timer family %s.","messagePattern":"Unable to find inbound timer receiver for instruction (.+?), transform (.+?), and timer family (.+?)\\.","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"sdks/java/core/src/main/java/org/apache/beam/sdk/fn/data/BeamFnDataInboundObserver.java","lineNumber":246,"sourceCode":"        inputStream = data.getData().newInput();\n      }\n      Coder<Object> coder = (Coder<Object>) endpoint.endpoint.getCoder();\n      FnDataReceiver<Object> receiver = (FnDataReceiver<Object>) endpoint.endpoint.getReceiver();\n      while (inputStream.available() > 0) {\n        receiver.accept(coder.decode(inputStream));\n      }\n      if (isLast) {\n        endpoint.isDone = true;\n        numEndpointsThatAreIncomplete -= 1;\n      }\n    }\n\n    while (timerElements.hasNext()) {\n      Elements.Timers timers = timerElements.next();\n      Map<String, EndpointStatus<TimerEndpoint<?>>> timerFamilyIdToEndpoints =\n          transformIdToTimerFamilyIdToTimerEndpoint.get(timers.getTransformId());\n      if (timerFamilyIdToEndpoints == null) {\n        throw new IllegalStateException(\n            String.format(\n                \"Unable to find inbound timer receiver for instruction %s, transform %s, and timer family %s.\",\n                timers.getInstructionId(), timers.getTransformId(), timers.getTimerFamilyId()));\n      }\n      EndpointStatus<TimerEndpoint<?>> endpoint =\n          timerFamilyIdToEndpoints.get(timers.getTimerFamilyId());\n      if (endpoint == null) {\n        throw new IllegalStateException(\n            String.format(\n                \"Unable to find inbound timer receiver for instruction %s, transform %s, and timer family %s.\",\n                timers.getInstructionId(), timers.getTransformId(), timers.getTimerFamilyId()));\n      } else if (endpoint.isDone) {\n        throw new IllegalStateException(\n            String.format(\n                \"Received timer after inbound timer receiver is done for instruction %s, transform %s, and timer family %s.\",\n                timers.getInstructionId(), timers.getTransformId(), timers.getTimerFamilyId()));\n      }\n      InputStream inputStream = timers.getTimers().newInput();","sourceCodeStart":228,"sourceCodeEnd":264,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/core/src/main/java/org/apache/beam/sdk/fn/data/BeamFnDataInboundObserver.java#L228-L264","documentation":"multiplexElements throws IllegalStateException when the transform id of an inbound Elements.Timers message has no timer-family endpoint map registered for the instruction. No timer receivers were configured for that transform.","triggerScenarios":"Receiving Elements.Timers whose transformId is missing from transformIdToTimerFamilyIdToTimerEndpoint during awaitCompletion — timers streamed for a transform with no registered timer endpoints, or stale instruction data.","commonSituations":"Bundle registered without timer receivers but the harness streams timers; transform id mismatch between runner and harness; data for a poisoned/reused instruction id.","solutions":["Register timer-family endpoints for every transform expected to emit timers (setup for process bundle with timers).","Confirm transform ids in the sent Elements.Timers match the registered endpoint map keys.","Ensure instruction ids are unique per bundle so stale timer data doesn't hit the wrong map.","Catch IllegalStateException in awaitCompletion and fail the bundle with a descriptive error."],"exampleFix":"// before\nobserver.awaitCompletion(); // ISE: no timer endpoints for transform\n// after\napi.addBeamFnTimerEndpoint(instructionId, transformId, timerFamilyId, coder, timerReceiver);\nobserver.awaitCompletion();","handlingStrategy":"validation","validationCode":"boolean ok = transformIdToTimerFamilyIdToTimerEndpoint.containsKey(timers.getTransformId()); if (!ok) { registerTimerEndpoints(...); }","typeGuard":null,"tryCatchPattern":"try { observer.awaitCompletion(); } catch (IllegalStateException e) { failBundle(instructionId, e); }","preventionTips":["Register timer endpoints for every transform that can emit timers","Validate transform ids before starting the bundle","Use unique instruction ids per bundle"],"tags":["java","beam-fn","timers","receiver-registration"],"backgroundTag":"resource-not-found","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-15T02:17:10.978Z"}