Github user joewitt commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/987#discussion_r77650137
  
    --- Diff: 
nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-0-9-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/ConsumerLease.java
 ---
    @@ -47,22 +156,244 @@
          * kafka client to collect more data from Kafka before committing the
          * offsets.
          *
    -     * @param offsets offsets
    -     * @throws KafkaException if issue occurs talking to underlying 
resource.
    +     * if false then we didn't do anything and should probably yield if 
true
    +     * then we committed new data
    +     *
    +     */
    +    boolean commit() {
    +        if (uncommittedOffsetsMap.isEmpty()) {
    +            resetInternalState();
    +            return false;
    +        }
    +        try {
    +            /**
    +             * Committing the nifi session then the offsets means we have 
an at
    +             * least once guarantee here. If we reversed the order we'd 
have at
    +             * most once.
    +             */
    +            final Collection<FlowFile> bundledFlowFiles = getBundles();
    +            if (!bundledFlowFiles.isEmpty()) {
    +                getProcessSession().transfer(getBundles(), REL_SUCCESS);
    --- End diff --
    
    no reason - just me being a goofball.  Fixed and pushed


---
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.
---

Reply via email to