Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

ConsumeIMAP - Reset State?

avatar
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

avatar
Super Guru

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

 

 

View solution in original post

2 REPLIES 2

avatar
Super Guru

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

 

 

avatar
Visitor

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.