apache/seatunnel · error · PulsarConnectorException
PulsarConnectorErrorCode.DESERIALIZATION_SCHEMA_NOT_FOUND
PulsarConnectorErrorCode.DESERIALIZATION_SCHEMA_NOT_FOUND
Error message
No consumer metadata found for table '%s'. Default table path: '%s'. Available tables: [%s]. This is likely a bug in the multi-table routing logic.
What it means
Thrown by PulsarSourceReader.resolveConsumerMetadata when a record's table path has no entry in consumerMetadataMap. The reader keeps deserialization schema/consumer metadata per table for multi-table Pulsar sources; a record arriving for an unknown table indicates routing metadata was never registered, which the code flags as a bug in the multi-table routing logic.
Source
Thrown at seatunnel-connectors-v2/connector-pulsar/src/main/java/org/apache/seatunnel/connectors/seatunnel/pulsar/source/reader/PulsarSourceReader.java:325
private TablePath resolveTablePath(PulsarPartitionSplit split) {
return split.getTablePath() != null ? split.getTablePath() : defaultTablePath;
}
private PulsarConsumerMetadata resolveConsumerMetadata(TablePath tablePath) {
PulsarConsumerMetadata metadata =
tablePath == null ? null : consumerMetadataMap.get(tablePath);
if (metadata == null && defaultTablePath != null) {
metadata = consumerMetadataMap.get(defaultTablePath);
}
if (metadata == null) {
String tablePathStr = tablePath != null ? tablePath.toString() : "null";
String defaultTablePathStr =
defaultTablePath != null ? defaultTablePath.toString() : "null";
String availableTables =
consumerMetadataMap.keySet().stream()
.map(TablePath::toString)
.collect(Collectors.joining(", "));
throw new PulsarConnectorException(
PulsarConnectorErrorCode.DESERIALIZATION_SCHEMA_NOT_FOUND,
String.format(
"No consumer metadata found for table '%s'. "
+ "Default table path: '%s'. "
+ "Available tables: [%s]. "
+ "This is likely a bug in the multi-table routing logic.",
tablePathStr, defaultTablePathStr, availableTables));
}
return metadata;
}
@SuppressWarnings("unchecked")
private DeserializationSchema<T> resolveDeserializationSchema(TablePath tablePath) {
return (DeserializationSchema<T>)
resolveConsumerMetadata(tablePath).getDeserializationSchema();
}
private Collector<T> resolveCollector(View on GitHub (pinned to cf67b549a7)
Solutions
- Verify the split/topic enumeration registers consumer metadata for every topic the reader can receive (check the split enumerator's routing logic).
- Compare the reported table path and the 'Available tables' list to spot case or format mismatches (e.g. database.table differences).
- Restart the job so the enumerator re-discovers topics and rebuilds the metadata map.
- If a genuinely new topic appeared at runtime, ensure the connector supports dynamic discovery or restrict the topic pattern to pre-registered tables.
- If all metadata looks correct, file a bug with the full message including default table path and available tables — the code itself marks this an internal invariant violation.
Defensive patterns
Strategy: validation
Validate before calling
// before processing, confirm every topic of every split is registered
splits.forEach(s -> {
TablePath tp = toTablePath(s.getPartition());
if (!registeredMetadata.containsKey(tp)) {
throw new IllegalStateException("Unregistered table in split: " + tp);
}
}); Try / catch
try { schema = resolveDeserializationSchema(tablePath); } catch (PulsarConnectorException e) { LOG.error("Routing bug: table {} not in metadata {}", tablePath, e.getMessage()); throw e; } Prevention
- Keep topic-pattern discovery and metadata registration in lockstep
- Normalize TablePath casing/format before lookup
- Restrict topic patterns to pre-registered tables in multi-table jobs
When it happens
Trigger: Reading a record whose topic maps to a TablePath not present in consumerMetadataMap — e.g. metadata() or resolveDeserializationSchema() called with a TablePath that no SourceReader/SplitEnumerator registered, or a split whose topics were not covered during metadata initialization.
Common situations: Multi-table (topic-pattern or table-routing) Pulsar source where the enumerator discovered a new topic after metadata was built; dynamic topic addition without a checkpoint/restart; mis-mapped topic-to-TablePath conversion producing a TablePath that differs in case/format from the registered one.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED
- MultiTableWriterRunnable can't find writer for tableId:
- Elasticsearch multi-table writer requires ElasticsearchMulti
- CATALOG_TABLE_SIZE_IS_ERROR
- CONFIG_VALIDATION_FAILED
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/dc155cff51838ebb.
Report an issue: GitHub.