Github user markap14 commented on a diff in the pull request: https://github.com/apache/nifi/pull/295#discussion_r57087522 --- Diff: nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/main/java/org/apache/nifi/processors/kafka/PutKafka.java --- @@ -371,11 +371,12 @@ private FlowFile cleanUpFlowFileIfNecessary(FlowFile flowFile, ProcessSession se /** * */ - private Object determinePartition(SplittableMessageContext messageContext, ProcessContext context, FlowFile flowFile) { + private Integer determinePartition(SplittableMessageContext messageContext, ProcessContext context, + FlowFile flowFile) { String partitionStrategy = context.getProperty(PARTITION_STRATEGY).getValue(); - String partitionValue = null; + Integer partitionValue = null; if (partitionStrategy.equalsIgnoreCase(USER_DEFINED_PARTITIONING.getValue())) { - partitionValue = context.getProperty(PARTITION).evaluateAttributeExpressions(flowFile).getValue(); + partitionValue = Integer.parseInt(context.getProperty(PARTITION).evaluateAttributeExpressions(flowFile).getValue()); --- End diff -- We should probably wrap the Integer.parseInt() in a try/catch and if an Exception is thrown return null?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---