risingwavelabs/risingwave · error
pubsub.ack_deadline_seconds must be between 10 and 600
Error message
pubsub.ack_deadline_seconds must be between 10 and 600
What it means
The PubSub subscriber's ack deadline controls how long the streaming pull client waits before re-delivering unacknowledged messages. PubsubProperties::subscriber_config validates that ack_deadline_seconds (default DEFAULT_ACK_DEADLINE_SECONDS if unset) is within Google's allowed 10-600 second range and bails otherwise.
Source
Thrown at src/connector/src/source/google_pubsub/mod.rs:156
type SplitEnumerator = PubsubSplitEnumerator;
type SplitReader = PubsubSplitReader;
const SOURCE_NAME: &'static str = GOOGLE_PUBSUB_CONNECTOR;
}
impl crate::source::UnknownFields for PubsubProperties {
fn unknown_fields(&self) -> HashMap<String, String> {
self.unknown_fields.clone()
}
}
impl PubsubProperties {
pub(crate) fn subscriber_config(&self) -> ConnectorResult<SubscriberConfig> {
let stream_ack_deadline_seconds = self
.ack_deadline_seconds
.unwrap_or(DEFAULT_ACK_DEADLINE_SECONDS);
if !(10..=600).contains(&stream_ack_deadline_seconds) {
bail!("pubsub.ack_deadline_seconds must be between 10 and 600");
}
let max_outstanding_messages = self
.max_outstanding_messages
.unwrap_or(DEFAULT_MAX_OUTSTANDING_MESSAGES);
if max_outstanding_messages <= 0 {
bail!("pubsub.max_outstanding_messages must be greater than 0");
}
let max_outstanding_bytes = self
.max_outstanding_bytes
.unwrap_or(DEFAULT_MAX_OUTSTANDING_BYTES);
if max_outstanding_bytes <= 0 {
bail!("pubsub.max_outstanding_bytes must be greater than 0");
}
Ok(SubscriberConfig {
stream_ack_deadline_seconds,View on GitHub (pinned to 6469eb736d)
Solutions
- Set pubsub.ack_deadline_seconds to an integer between 10 and 600, e.g. 60.
- Remove the property entirely to use the default deadline.
- If you need longer processing time, keep the deadline <= 600 and rely on message ack extension/retry semantics instead.
Example fix
-- before WITH (connector = 'google_pubsub', pubsub.ack_deadline_seconds = 1000) -- after WITH (connector = 'google_pubsub', pubsub.ack_deadline_seconds = 300)
Defensive patterns
Strategy: validation
Validate before calling
function ackDeadlineOk(v) {
return v === undefined || (Number.isInteger(v) && v >= 10 && v <= 600);
} Type guard
function isValidAckDeadline(v) {
return typeof v === "number" && Number.isInteger(v) && v >= 10 && v <= 600;
} Try / catch
if (!(ackDeadline >= 10 && ackDeadline <= 600)) {
throw new RangeError("pubsub.ack_deadline_seconds must be between 10 and 600");
} Prevention
- Remember the unit is seconds, Google's hard bounds are 10-600.
- Prefer omitting the property and using the default unless you have a reason.
- Validate integer ranges in config templates before deployment.
When it happens
Trigger: Setting `pubsub.ack_deadline_seconds` to a value below 10 or above 600 in the source WITH clause; the check runs whenever subscriber_config() is called (e.g., from PubsubSplitReader/EnumeratorClient::new).
Common situations: Misreading the unit (thinking it's milliseconds and setting 500); copying an aggressive deadline from another connector; typos like 1000 or 5.
Understand the failure class
Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.
Related errors
- pubsub.max_outstanding_messages must be greater than 0
- pubsub.max_outstanding_bytes must be greater than 0
- credentials must be set if not using the pubsub emulator
- subscription {} does not exist
- specify at most one of start_offset or start_snapshot
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/54a9b31d57dd0941.
Report an issue: GitHub.