{"record":{"id":"5322c324e1510db7","repo":"apache/beam","slug":"solaceio-write-overriding-jcsmp-properties-for-testing-if","errorCode":null,"errorMessage":"SolaceIO.Write: Overriding JCSMP properties for testing. **IF THIS IS AN ACTUAL PIPELINE, CHANGE THE SUBMISSION MODE TO HIGHER_THROUGHPUT OR LOWER_LATENCY.**","messagePattern":"SolaceIO\\.Write: Overriding JCSMP properties for testing\\. \\*\\*IF THIS IS AN ACTUAL PIPELINE, CHANGE THE SUBMISSION MODE TO HIGHER_THROUGHPUT OR LOWER_LATENCY\\.\\*\\*","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"sdks/java/io/solace/src/main/java/org/apache/beam/sdk/io/solace/broker/SessionService.java","lineNumber":274,"sourceCode":"\n        // Override the properties\n        // Send from the same thread where the produced is being called. This offers the lowest\n        // latency, but a low throughput too.\n        props.setProperty(JCSMPProperties.MESSAGE_CALLBACK_ON_REACTOR, true);\n        props.setProperty(JCSMPProperties.PUB_ACK_WINDOW_SIZE, STREAMING_PUB_ACK_WINDOW);\n        LOG.info(\n            \"SolaceIO.Write: Using LOWER_LATENCY mode, MESSAGE_CALLBACK_ON_REACTOR is TRUE,\"\n                + \" PUB_ACK_WINDOW_SIZE is {}\",\n            STREAMING_PUB_ACK_WINDOW);\n\n        break;\n      case CUSTOM:\n        LOG.info(\n            \" SolaceIO.Write: Using the custom JCSMP properties set by the user. No property has\"\n                + \" been overridden by the connector.\");\n        break;\n      case TESTING:\n        LOG.warn(\n            \"SolaceIO.Write: Overriding JCSMP properties for testing. **IF THIS IS AN\"\n                + \" ACTUAL PIPELINE, CHANGE THE SUBMISSION MODE TO HIGHER_THROUGHPUT \"\n                + \"OR LOWER_LATENCY.**\");\n        // Minimize multi-threading for testing\n        props.setProperty(JCSMPProperties.MESSAGE_CALLBACK_ON_REACTOR, true);\n        props.setProperty(JCSMPProperties.PUB_ACK_WINDOW_SIZE, TESTING_PUB_ACK_WINDOW);\n        break;\n      default:\n        LOG.error(\n            \"SolaceIO.Write: no submission mode is selected. Set the submission mode to\"\n                + \" HIGHER_THROUGHPUT or LOWER_LATENCY;\");\n    }\n    return props;\n  }\n}\n","sourceCodeStart":256,"sourceCodeEnd":290,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/solace/src/main/java/org/apache/beam/sdk/io/solace/broker/SessionService.java#L256-L290","documentation":"The TESTING submission mode forces single-threaded-friendly JCSMP settings (callback on reactor true, minimal ack window) for local tests. Because these settings are unsuitable for production, a prominent WARN tells developers to change the mode if running a real pipeline.","triggerScenarios":"Calling SolaceIO.write() with .withSubmissionMode(SubmissionMode.TESTING) (or leaving it set) in a deployed pipeline.","commonSituations":"Prototype/test pipelines promoted to staging/production without removing the TESTING mode; throughput is throttled and messages ack very conservatively.","solutions":["Change to .withSubmissionMode(SubmissionMode.HIGHER_THROUGHPUT) or LOWER_LATENCY for real workloads.","Audit pipeline configs during promotion from test to prod so TESTING mode never ships.","Use CUSTOM mode with explicit JCSMP properties if you need full control."],"exampleFix":"// before\nSolaceIO.write().withSubmissionMode(SubmissionMode.TESTING)\n// after\nSolaceIO.write().withSubmissionMode(SubmissionMode.HIGHER_THROUGHPUT)","handlingStrategy":"validation","validationCode":"assert submissionMode != SubmissionMode.TESTING : \"TESTING submission mode must not reach production pipelines\";","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Gate TESTING mode behind test-only profiles/config flags.","Add a startup check that fails (or alerts) on TESTING mode outside test scope.","Default to HIGHER_THROUGHPUT/LOWER_LATENCY in template configs.","Review this warning in staging logs before production rollout."],"tags":["java","solace","message-queue","testing","configuration"],"backgroundTag":"invalid-config-value","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}