apache/pulsar · error · IllegalArgumentException
Supported namespace bundle split algorithms must contains th
Error message
Supported namespace bundle split algorithms must contains the default namespace bundle split algorithm
What it means
After checking that all supported algorithms are valid, the broker requires defaultNamespaceBundleSplitAlgorithm to be a member of supportedNamespaceBundleSplitAlgorithms. If the default is not in the supported list, startup fails with this IllegalArgumentException.
Source
Thrown at pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java:191
.toAbsolutePath().normalize().toString();
brokerConfig = loadConfig(filepath);
}
int maxFrameSize = brokerConfig.getMaxMessageSize() + Commands.MESSAGE_SIZE_FRAME_PADDING;
if (maxFrameSize >= DirectMemoryUtils.jvmMaxDirectMemory()) {
throw new IllegalArgumentException("Max message size need smaller than jvm directMemory");
}
if (!NamespaceBundleSplitAlgorithm.AVAILABLE_ALGORITHMS.containsAll(
brokerConfig.getSupportedNamespaceBundleSplitAlgorithms())) {
throw new IllegalArgumentException(
"The given supported namespace bundle split algorithm has unavailable algorithm. "
+ "Available algorithms are " + NamespaceBundleSplitAlgorithm.AVAILABLE_ALGORITHMS);
}
if (!brokerConfig.getSupportedNamespaceBundleSplitAlgorithms().contains(
brokerConfig.getDefaultNamespaceBundleSplitAlgorithm())) {
throw new IllegalArgumentException("Supported namespace bundle split algorithms "
+ "must contains the default namespace bundle split algorithm");
}
// init functions worker
if (starterArguments.runFunctionsWorker || brokerConfig.isFunctionsWorkerEnabled()) {
final String filepath = Path.of(starterArguments.fnWorkerConfigFile)
.toAbsolutePath().normalize().toString();
workerConfig = PulsarService.initializeWorkerConfigFromBrokerConfig(brokerConfig, filepath);
functionsWorkerService = WorkerServiceLoader.load(workerConfig);
} else {
workerConfig = null;
functionsWorkerService = null;
}
// init pulsar service
pulsarService = new PulsarService(brokerConfig,
workerConfig,
Optional.ofNullable(functionsWorkerService),View on GitHub (pinned to 820761864e)
Solutions
- Add the default algorithm to supportedNamespaceBundleSplitAlgorithms in broker.conf
- Or change defaultNamespaceBundleSplitAlgorithm to one of the supported entries
- Restart the broker after the config fix
Example fix
// before (broker.conf) supportedNamespaceBundleSplitAlgorithms=topic_count_evenness_split defaultNamespaceBundleSplitAlgorithm=specified_positions_split // after supportedNamespaceBundleSplitAlgorithms=topic_count_evenness_split,specified_positions_split defaultNamespaceBundleSplitAlgorithm=topic_count_evenness_split
Defensive patterns
Strategy: validation
Validate before calling
String def = brokerConf.getDefaultNamespaceBundleSplitAlgorithm();
Set<String> supported = Set.of(brokerConf.getSupportedNamespaceBundleSplitAlgorithms().split(","));
if (!supported.contains(def)) {
throw new IllegalStateException("defaultNamespaceBundleSplitAlgorithm " + def
+ " must be in " + supported);
} Try / catch
try {
int rc = starter.call();
} catch (IllegalArgumentException e) {
if (e.getMessage().contains("must contains the default")) {
throw new IllegalStateException("Add the default algorithm to supportedNamespaceBundleSplitAlgorithms", e);
}
throw e;
} Prevention
- Change supportedNamespaceBundleSplitAlgorithms and defaultNamespaceBundleSplitAlgorithm together
- Add a config smoke test asserting default ∈ supported before deployment
When it happens
Trigger: broker.conf sets supportedNamespaceBundleSplitAlgorithms without including the value of defaultNamespaceBundleSplitAlgorithm (or leaves default at a value not present in a custom supported list).
Common situations: Overriding the supported list (e.g. only topic_count_evenness_split) while defaultNamespaceBundleSplitAlgorithm stays at the default (specified_positions_split); partial config copy between clusters.
Related errors
- The given supported namespace bundle split algorithm has una
- Timeout during delete operation
- Timeout during close operation
- Timeout during open-cursor operation
- Timeout during delete-cursors operation
AI-assisted analysis of apache/pulsar@820761864e (2026-09-06).
Data as JSON: /api/errors/cefff799caf5c392.
Report an issue: GitHub.