You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Oleg Zhurakousky (JIRA)" <ji...@apache.org> on 2016/07/23 00:16:20 UTC

[jira] [Created] (NIFI-2372) Allow ProcessSession to be passed to operations annotated with @OnUnscsheduled

Oleg Zhurakousky created NIFI-2372:
--------------------------------------

             Summary: Allow ProcessSession to be passed to operations annotated with @OnUnscsheduled
                 Key: NIFI-2372
                 URL: https://issues.apache.org/jira/browse/NIFI-2372
             Project: Apache NiFi
          Issue Type: Improvement
          Components: Core Framework
            Reporter: Oleg Zhurakousky
            Assignee: Oleg Zhurakousky
            Priority: Minor
             Fix For: 1.1.0


With adoption of NiFi there are more and more cases where Processors that source their data from the external systems (e.g., Email, JMS, MQTT etc) may need to hold an internal queue of data to be sent as content in individual FlowFiles. This implies somewhat of a persistent *state* between subsequent invocation of the _onTriggered(..)_ operation. This creates a problem for the processors that still have data in the internal data queue while being stopped. 
While stoping of the processor is not a real issue (since the instance of the processor is preserved), the subsequent stopping of NiFi that may follow is. 

One of the way of dealing with it is to drain the internal data queue  before shitting down processor, but that requires access to ProcessSession which is not currently supported by NiFi to operations annotated with _@OnUnscheduled_, resulting in variety of workarounds (e.g., have ProcessSession as instance variable of the Processor instance, etc.).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)