{"record":{"id":"dcabc2c005e173ad","repo":"apache/seatunnel","slug":"option-option-must-be-greater-than-0","errorCode":null,"errorMessage":"Option '${option}' must be greater than 0","messagePattern":"Option '(.+?)' must be greater than 0","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-google-pubsub/src/main/java/org/apache/seatunnel/connectors/seatunnel/google/pubsub/config/GooglePubSubSourceConfig.java","lineNumber":97,"sourceCode":"                .parallelPullCount(parallelPullCount)\n                .build();\n    }\n\n    private static void requireNonBlank(String value, String option) {\n        if (value == null || value.trim().isEmpty()) {\n            throw new IllegalArgumentException(\"Option '\" + option + \"' cannot be blank\");\n        }\n    }\n\n    private static void requireNonBlankIfPresent(String value, String option) {\n        if (value != null) {\n            requireNonBlank(value, option);\n        }\n    }\n\n    private static void requirePositive(Number value, String option) {\n        if (value != null && value.longValue() <= 0) {\n            throw new IllegalArgumentException(\"Option '\" + option + \"' must be greater than 0\");\n        }\n    }\n}\n","sourceCodeStart":79,"sourceCodeEnd":101,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-google-pubsub/src/main/java/org/apache/seatunnel/connectors/seatunnel/google/pubsub/config/GooglePubSubSourceConfig.java#L79-L101","documentation":"Thrown by requirePositive in GooglePubSubSourceConfig when a numeric tuning option (max_outstanding_messages, max_outstanding_bytes, parallel_pull_count) is supplied but is zero or negative. Null is allowed (falls back to client default); a present value must be > 0.","triggerScenarios":"Calling GooglePubSubSourceConfig.from with any of max_outstanding_messages, max_outstanding_bytes, or parallel_pull_count set to 0 or a negative number.","commonSituations":"Users set max_outstanding_messages = 0 intending 'unlimited', or a computed/default-interpolated value evaluates to 0. The Google Pub/Sub client itself requires strictly positive values for these builder parameters.","solutions":["Change the offending option to a positive value (e.g. max_outstanding_messages = 1000, parallel_pull_count = 5).","Remove the option entirely to let the connector/GCP client use its default.","Review any templated config where arithmetic or env defaults may produce 0."],"exampleFix":"// before\nmax_outstanding_messages = 0\n// after\nmax_outstanding_messages = 1000","handlingStrategy":"validation","validationCode":"long msgs = Long.parseLong(config.get(\"max_outstanding_messages\"));\nlong bytes = Long.parseLong(config.get(\"max_outstanding_bytes\"));\nint pullers = Integer.parseInt(config.get(\"parallel_pull_count\"));\nif (msgs <= 0 || bytes <= 0 || pullers <= 0) throw new IllegalArgumentException(\"numeric options must be > 0\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never use 0 to mean 'unlimited' — omit the option for client defaults.","Guard computed/templated numeric values against evaluating to 0."],"tags":["config-validation","google-pubsub","java"],"backgroundTag":"invalid-config-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}