Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

ConsumeIMAP - Reset State?

Solved Go to solution

ConsumeIMAP - Reset State?

New Contributor

Consumer IMAP - Reset State?

Can anyone tell me how to control state on Consume IMAP (v1.11.4)
I have successfully implemented a flow where I receive emails using the ConsumeIMAP ExtractEmailHeaders and ExtractEmailAttachements, all is working as expected.

I have set the properties:


Delete Messages = false
Mark Message as Read = false

 

so my emails remain in the INBOX.

I would like a way to "reset" -  so that the processor would receive all the emails again, however I can't seem to find where state is controlled.

Stopping and starting the processor does not reset;

Stopping/Starting Nifi does not reset.

 

Does this processor hold some other state or does it query my provenance to workout where it is up to? Would I need to delete the provenance to reset it?

 

I was expecting some kinds of state similar to ListSFTP?

 

Any help appreciated

 

John

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: ConsumeIMAP - Reset State?

@JohnA 


Per documentation: https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-email-nar/1.11.0/org.apache.n...

 

State management:

This component does not store state.

 

If you click Additional Details:  https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-email-nar/1.11.0/org.apache.n...

 

It goes into some debug steps that may help you understand what is going on.

 

Unfortunately I think the only way to reset it, would be to delete and create again.

 

 

 


 


If this answer resolves your issue or allows you to move forward, please choose to ACCEPT this solution and close this topic. If you have further dialogue on this topic please comment here or feel free to private message me. If you have new questions related to your Use Case please create separate topic and feel free to tag me in your post.  


 


Thanks,



Steven

View solution in original post

2 REPLIES 2
Highlighted

Re: ConsumeIMAP - Reset State?

@JohnA 


Per documentation: https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-email-nar/1.11.0/org.apache.n...

 

State management:

This component does not store state.

 

If you click Additional Details:  https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-email-nar/1.11.0/org.apache.n...

 

It goes into some debug steps that may help you understand what is going on.

 

Unfortunately I think the only way to reset it, would be to delete and create again.

 

 

 


 


If this answer resolves your issue or allows you to move forward, please choose to ACCEPT this solution and close this topic. If you have further dialogue on this topic please comment here or feel free to private message me. If you have new questions related to your Use Case please create separate topic and feel free to tag me in your post.  


 


Thanks,



Steven

View solution in original post

Highlighted

Re: ConsumeIMAP - Reset State?

New Contributor

In reality despite ConsumeIMAP is stateless, the IMAP server holds /Recent flag that is system read-only flag (theoretically within IMAP session, but how Gmail detect unique session is a BlackBox and I was not able to manage it with NiFi ConsumeIMAP client).

 

If you want to re-fetch all your historical emails I recommend using ConsumePOP3 NiFi component, with the following setting on Gmail server:

Gmail - settings - all - forwarding - Enable POP for all mail

After performing such historical fetch you can disable ConsumePOP3 and continue to work with ConsumeIMAP to consume new messages.

Don't have an account?
Coming from Hortonworks? Activate your account here