RomanOttGmx commented on PR #6900:
URL: https://github.com/apache/nifi/pull/6900#issuecomment-1977185841

   In IMAP Processor buildUrl will be triggered on creation of new receiver.
   
   ```
   `protected ImapMailReceiver buildMessageReceiver(ProcessContext 
processContext) {
           ImapMailReceiver receiver = new 
ImapMailReceiver(this.buildUrl(processContext));`
   ```
           
    And the buildMessageReceiver is requested here in AbstractEmailProcessor
   ```
    private synchronized void initializeIfNecessary(ProcessContext context, 
ProcessSession processSession) {
           if (this.messageReceiver == null) {
               this.processSession = processSession;
               this.messageReceiver = this.buildMessageReceiver(context);
   ```
    This is called in onTrigger method of AbstractEmailProcessor, but the 
receiver still exists since start up, so buildUrl will never be requested again 
after enabling the ConsumeImapProcessor.
    
    ```
   public void onTrigger(ProcessContext context, ProcessSession processSession) 
throws ProcessException {
           this.initializeIfNecessary(context, processSession);
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to