[
https://issues.apache.org/jira/browse/NIFI-2192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15368207#comment-15368207
]
ASF GitHub Bot commented on NIFI-2192:
--------------------------------------
Github user markap14 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/618#discussion_r70124648
--- Diff:
nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/main/java/org/apache/nifi/processors/kafka/KafkaPublisher.java
---
@@ -114,10 +121,13 @@ KafkaPublisherResult publish(PublishingContext
publishingContext) {
int prevLastAckedMessageIndex =
publishingContext.getLastAckedMessageIndex();
List<Future<RecordMetadata>> resultFutures = new ArrayList<>();
+ System.out.println(1 - prevLastAckedMessageIndex);
byte[] messageBytes;
int tokenCounter = 0;
- for (; (messageBytes = streamTokenizer.nextToken()) != null;
tokenCounter++) {
+ boolean continueSending = true;
+ KafkaPublisherResult result = null;
+ for (; (messageBytes = streamTokenizer.nextToken()) != null &&
continueSending; tokenCounter++) {
--- End diff --
Should we change the conditional here to `continueSending && (messageBytes
= streamTokenizer.nextToken()) != null` so that we don't bother calling
streamTokenizer.nextToken() if `continueSending` is false?
> PutKafka results in OOME if sending very large delimited file
> -------------------------------------------------------------
>
> Key: NIFI-2192
> URL: https://issues.apache.org/jira/browse/NIFI-2192
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Affects Versions: 0.7.0
> Reporter: Mark Payne
> Assignee: Oleg Zhurakousky
> Priority: Blocker
> Fix For: 1.0.0, 0.7.0
>
>
> If I send a very large file to kafka via PutKafka using a delimiter, I see
> the Java heap fill up until we see constant Full Garbage Collections and the
> node eventually dies.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)