apache/beam · error · IllegalStateException
SolaceIO.Write.UnboundedSolaceWriter.Context: Timestamp is r
Error message
SolaceIO.Write.UnboundedSolaceWriter.Context: Timestamp is required for a FinishBundleContext.
What it means
UnboundedSolaceWriter.Context.output throws this IllegalStateException when emitting via a FinishBundleContext without a timestamp. FinishBundleContext.output requires an explicit timestamp and window (unlike WindowedContext, which derives them); a null timestamp is a caller invariant violation in publishResults.
Source
Thrown at sdks/java/io/solace/src/main/java/org/apache/beam/sdk/io/solace/write/UnboundedSolaceWriter.java:357
return beamContextWrapper;
}
public static BeamContextWrapper of(FinishBundleContext finishBundleContext) {
BeamContextWrapper beamContextWrapper = new BeamContextWrapper();
beamContextWrapper.finishBundleContext = finishBundleContext;
return beamContextWrapper;
}
public <T> void output(
TupleTag<T> tag,
T output,
@Nullable Instant timestamp, // Not required for windowed context
@Nullable BoundedWindow window) { // Not required for windowed context
if (windowedContext != null) {
windowedContext.output(tag, output);
} else if (finishBundleContext != null) {
if (timestamp == null) {
throw new IllegalStateException(
"SolaceIO.Write.UnboundedSolaceWriter.Context: Timestamp is required for a"
+ " FinishBundleContext.");
}
if (window == null) {
throw new IllegalStateException(
"SolaceIO.Write.UnboundedSolaceWriter.Context: BoundedWindow is required for a"
+ " FinishBundleContext.");
}
finishBundleContext.output(tag, output, timestamp, window);
} else {
throw new IllegalStateException(
"SolaceIO.Write.UnboundedSolaceWriter.Context: No context provided");
}
}
}
}
View on GitHub (pinned to 12126d8942)
Solutions
- Ensure publishResults/finishBundle passes a non-null timestamp (e.g. the bundle's minimum event timestamp or clock time) when emitting.
- If you subclass the writer, always supply Instant.now() or a derived timestamp to context.output in finishBundle.
- Check for null timestamp propagation from record metadata and default it before output.
- Report/pin the Beam version — this may be an internal bug in the connector's publishResults path.
Example fix
// before context.output(tag, results); // timestamp null in finishBundle // after context.output(tag, results, Instant.now(), window);
Defensive patterns
Strategy: validation
Validate before calling
if (finishBundleContext != null && timestamp == null) {
throw new IllegalStateException("finishBundle output requires a non-null timestamp");
} Try / catch
try { context.output(tag, results); } catch (IllegalStateException e) { if (e.getMessage().contains("Timestamp is required")) { /* supply timestamp */ } throw e; } Prevention
- Always pass a concrete Instant when emitting from finishBundle
- Don't override finishBundle in subclasses without supplying timestamp/window
- Test writer behavior on your Beam runner version
When it happens
Trigger: Calling Context.output(tag, output) during finishBundle (finishBundleContext set, windowedContext null) while passing timestamp == null — an internal path bug in publishResults or a subclass overriding bundle lifecycle incorrectly.
Common situations: Custom subclasses of UnboundedSolaceWriter overriding finishBundle and emitting results without a timestamp; Beam runner upgrades changing when finishBundle is invoked; constructing the writer's Context manually with a null timestamp.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- SolaceIO.Write.UnboundedSolaceWriter.Context: BoundedWindow
- Unsupported timestamp unit: ${type.getUnit().name()}
- BigQuery data contained value %s with sub-millisecond precis
- SolaceIO.Write.UnboundedSolaceWriter.Context: No context pro
- Illegal access to pipeline after visitor traversal was compl
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/6d719073cd4c4183.
Report an issue: GitHub.