Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

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
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
2 REPLIES 2

avatar
Super Guru
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

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