Github user ijokarumawak commented on a diff in the pull request: https://github.com/apache/nifi/pull/2362#discussion_r159790221 --- Diff: nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-0-10-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/PublisherLease.java --- @@ -71,9 +72,18 @@ void publish(final FlowFile flowFile, final InputStream flowFileContent, final b tracker = new InFlightMessageTracker(); } - try (final StreamDemarcator demarcator = new StreamDemarcator(flowFileContent, demarcatorBytes, maxMessageSize)) { + try { byte[] messageContent; - try { + if (demarcatorBytes == null || demarcatorBytes.length == 0) { --- End diff -- @markap14 I agree with that, added a code to transfer FlowFiles to 'failure' if content size exceeds the maxMessageSize. Thanks!
---