You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Datastream to BigQuery] NullPointerException in DataStreamIO when eventType is null #4273
The "Datastream to BigQuery" Dataflow template crashes with a NullPointerException when processing Pub/Sub notification messages that lack required attributes (specifically eventType or objectId).
Stack Trace
java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "eventType" is null
com.google.cloud.teleport.v2.datastream.sources.DataStreamIO$ExtractGcsFile.process(DataStreamIO.java:337)
Problem Description
In DataStreamIO$ExtractGcsFile.java (lines 333-337):
If eventType is null, invoking eventType.equals(...) throws a NullPointerException.
If objectId is null, invoking objectId.endsWith(...) will also throw a NullPointerException.
Impact
Because this exception occurs in the initial source stage (ExtractGcsFile) before the pipeline's DLQ handling is reached, Dataflow continuously nacks the message. Pub/Sub redelivers the message repeatedly, causing worker errors and stalling processing for up to the 7-day Pub/Sub message retention limit.
Proposed Fix
Make attribute comparisons null-safe:
if ("OBJECT_FINALIZE".equals(eventType) && objectId != null && !objectId.endsWith("/"))
Handle malformed or unexpected Pub/Sub messages gracefully by logging a warning or routing to a DLQ rather than throwing an uncaught runtime exception.
Activity
gauravjain6633 commentedon Sep 21, 2026
Working on the fix