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

  1. Set pubsub.ack_deadline_seconds to an integer between 10 and 600, e.g. 60.
  2. Remove the property entirely to use the default deadline.
  3. 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

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


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/54a9b31d57dd0941. Report an issue: GitHub.