{"record":{"id":"94cdb072239f93d9","repo":"apache/beam","slug":"unknown-jms-provider-s-for-individual-acknowledge-please","errorCode":null,"errorMessage":"Unknown JMS provider '%s' for INDIVIDUAL_ACKNOWLEDGE. Please specify the code explicitly via Read#withIndividualAcknowledgeModeCode(int).","messagePattern":"Unknown JMS provider '(.+?)' for INDIVIDUAL_ACKNOWLEDGE\\. Please specify the code explicitly via Read#withIndividualAcknowledgeModeCode\\(int\\)\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"sdks/java/io/jms/src/main/java/org/apache/beam/sdk/io/jms/JmsIO.java","lineNumber":752,"sourceCode":"\n    private int getAckModeCode(AcknowledgeMode mode) {\n      if (mode == AcknowledgeMode.CLIENT_ACKNOWLEDGE\n          || mode == AcknowledgeMode.CLIENT_ACKNOWLEDGE_UNSAFE) {\n        return Session.CLIENT_ACKNOWLEDGE;\n      } else if (mode == AcknowledgeMode.INDIVIDUAL_ACKNOWLEDGE) {\n        Integer configuredCode = source.spec.getIndividualAcknowledgeModeCode();\n        if (configuredCode != null) {\n          return configuredCode;\n        }\n        String connectionClassName = this.connection.getClass().getName();\n        if (connectionClassName.contains(\"org.apache.activemq.ActiveMQConnection\")) {\n          return 4;\n        } else if (connectionClassName.contains(\"org.apache.qpid.jms\")) {\n          return 101;\n        } else if (connectionClassName.contains(\"org.apache.activemq.artemis\")) {\n          return 101;\n        } else {\n          throw new IllegalArgumentException(\n              String.format(\n                  \"Unknown JMS provider '%s' for INDIVIDUAL_ACKNOWLEDGE. \"\n                      + \"Please specify the code explicitly via Read#withIndividualAcknowledgeModeCode(int).\",\n                  connectionClassName));\n        }\n      } else {\n        throw new IllegalArgumentException(String.format(\"Unknown AcknowledgeMode: %s\", mode));\n      }\n    }\n\n    @Override\n    public boolean start() throws IOException {\n      Read<T> spec = source.spec;\n      ConnectionFactory connectionFactory = spec.getConnectionFactory();\n      try {\n        Connection connection;\n        if (spec.getUsername() != null) {\n          connection = connectionFactory.createConnection(spec.getUsername(), spec.getPassword());","sourceCodeStart":734,"sourceCodeEnd":770,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/jms/src/main/java/org/apache/beam/sdk/io/jms/JmsIO.java#L734-L770","documentation":"When reading JMS messages with the INDIVIDUAL_ACKNOWLEDGE mode, Beam's JmsIO must map the underlying JMS connection factory class to a provider-specific acknowledge mode code (e.g. ActiveMQ=4, Qpid/Artemis=101). If the connection class name is not one of the recognized providers, UnboundedJmsReader throws this IllegalArgumentException. The workaround is to set the provider-specific code yourself via Read#withIndividualAcknowledgeModeCode(int).","triggerScenarios":"Creating a JmsIO.read() source with withAcknowledgeMode(JmsIO.INDIVIDUAL_ACKNOWLEDGE) whose connection factory class name (from withConnectionFactory) is not apache-activemq, qpid-jms, or artemis — e.g. IBM MQ, Solace, or a custom ConnectionFactory — and no explicit individualAcknowledgeModeCode was configured.","commonSituations":"Migrating a pipeline to a different JMS broker; using a wrapper or pooled ConnectionFactory whose class name doesn't contain the broker package; copying a config from an ActiveMQ project to another broker.","solutions":["Call JmsIO.read().withIndividualAcknowledgeModeCode(<code>) with your provider's documented individual-acknowledge mode code.","If using a wrapped/pooled ConnectionFactory, ensure the underlying class name contains the broker package, or set the explicit code regardless.","Check the broker's JMSSessionMode documentation (e.g. ActiveMQ Session.INDIVIDUAL_ACKNOWLEDGE=4) and pass that value."],"exampleFix":"// before\nJmsIO.<JmsRecord>read().withConnectionFactory(cf).withAcknowledgeMode(JmsIO.INDIVIDUAL_ACKNOWLEDGE)\n// after (e.g. IBM MQ code 4 / provider-specific)\nJmsIO.<JmsRecord>read().withConnectionFactory(cf)\n  .withAcknowledgeMode(JmsIO.INDIVIDUAL_ACKNOWLEDGE)\n  .withIndividualAcknowledgeModeCode(4)","handlingStrategy":"validation","validationCode":"String cls = connectionFactory.getClass().getName();\nboolean known = cls.contains(\"org.apache.activemq\") || cls.contains(\"org.apache.qpid.jms\") || cls.contains(\"org.apache.activemq.artemis\");\nif (!known) {\n  // must call .withIndividualAcknowledgeModeCode(code)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set withIndividualAcknowledgeModeCode explicitly when the broker is not stock ActiveMQ/Qpid/Artemis.","Log the connection factory class name during pipeline construction to catch wrapper classes."],"tags":["jms","configuration","unsupported-provider"],"backgroundTag":"invalid-argument-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"}