Created 06-15-2020 01:23 AM
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
Created 06-15-2020 08:02 AM
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.
Created 06-15-2020 08:02 AM
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.
Created 08-06-2020 08:42 AM
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.