{"record":{"id":"51da87a6f7fb9beb","repo":"flowable/flowable-engine","slug":"the-kafka-partition-value-was-not-found-for-the-ch","errorCode":null,"errorMessage":"The kafka partition value was not found for the channel model with key <channelModel.getKey()>. One of eventField, delegateExpression should be set.","messagePattern":"The kafka partition value was not found for the channel model with key <channelModel\\.getKey\\(\\)>\\. One of eventField, delegateExpression should be set\\.","errorType":"validation","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-event-registry-spring/src/main/java/org/flowable/eventregistry/spring/kafka/KafkaChannelDefinitionProcessor.java","lineNumber":701,"sourceCode":"        KafkaOutboundChannelModel.KafkaPartition partition = channelModel.getPartition();\n        if (partition == null) {\n            return null;\n        }\n\n        if (StringUtils.hasText(partition.getEventField())) {\n            return new EventPayloadKafkaPartitionProvider(partition.getEventField());\n        } else if (StringUtils.hasText(partition.getDelegateExpression())) {\n            return resolveExpression(partition.getDelegateExpression(), KafkaPartitionProvider.class);\n        } else if (StringUtils.hasText(partition.getRoundRobin())) {\n            List<TopicPartitionOffset> tpo = new ArrayList<>();\n            resolvePartitionAsInteger(channelModel.getTopic(), resolveExpression(partition.getRoundRobin()), tpo);\n            List<Integer> partitions = new ArrayList<>(tpo.size());\n            for (TopicPartitionOffset offset : tpo) {\n                partitions.add(offset.getPartition());\n            }\n            return new RoundRobinKafkaPartitionProvider(partitions);\n        } else {\n            throw new FlowableException(\n                    \"The kafka partition value was not found for the channel model with key \" + channelModel.getKey()\n                            + \". One of eventField, delegateExpression should be set.\");\n        }\n    }\n\n    protected KafkaMessageKeyProvider<?> resolveKafkaMessageKeyProvider(KafkaOutboundChannelModel channelModel) {\n        KafkaOutboundChannelModel.RecordKey recordKey = channelModel.getRecordKey();\n        if (recordKey == null) {\n            return null;\n        }\n        if (StringUtils.hasText(recordKey.getEventField())) {\n            return new EventPayloadKafkaMessageKeyProvider(recordKey.getEventField());\n        } else if (StringUtils.hasText(recordKey.getDelegateExpression())) {\n            return resolveExpression(recordKey.getDelegateExpression(), KafkaMessageKeyProvider.class);\n        } else if (recordKey.getFixedValue() != null) {\n            String fixedValue = org.apache.commons.lang3.StringUtils.defaultIfBlank(recordKey.getFixedValue(), null);\n            return ignore -> fixedValue;\n        } else {","sourceCodeStart":683,"sourceCodeEnd":719,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-event-registry-spring/src/main/java/org/flowable/eventregistry/spring/kafka/KafkaChannelDefinitionProcessor.java#L683-L719","documentation":"Thrown when the processor cannot build a KafkaPartitionProvider for an outbound channel: none of the supported sources for partition values (eventField, fixedValue via TopicPartition offsets, or delegateExpression) is configured on the channel model. The library requires at least one way to determine the Kafka target partition.","triggerScenarios":"Deploying/registering a Kafka outbound channel model whose partition definition has no eventField and no delegateExpression (and no TopicPartition offsets configured).","commonSituations":"Incomplete channel model JSON/YAML where the partition element was omitted or left empty; copying an inbound channel template to outbound use.","solutions":["Set an eventField on the partition element naming the event field that carries the partition.","Or set a delegateExpression resolving to a KafkaPartitionProvider.","Or configure explicit partitions (TopicPartition offsets) so a RoundRobinKafkaPartitionProvider is created.","Validate the channel model JSON before deployment (test deploy in a CI pipeline)."],"exampleFix":"// before\n\"partition\": {}\n// after\n\"partition\": { \"eventField\": \"partitionField\" }","handlingStrategy":"validation","validationCode":"boolean partitionsConfigured = partitionDef != null &&\n    (partitionDef.eventField != null || partitionDef.delegateExpression != null || partitionDef.partitions != null);","typeGuard":null,"tryCatchPattern":"try {\n    deployChannel(channelModel);\n} catch (FlowableException e) {\n    if (e.getMessage() != null && e.getMessage().contains(\"partition value was not found\")) {\n        log.error(\"Channel {} missing partition config\", channelModel.getKey(), e);\n    } else { throw e; }\n}","preventionTips":["Never ship a channel model with an empty partition element","Add schema validation of channel definitions in CI","Copy channel templates from working examples to keep required attributes"],"tags":["kafka","event-registry","missing-config"],"backgroundTag":"missing-required-config-field","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}