Support Questions

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

How does the input port know which device data is coming from?

avatar
Expert Contributor

Hi, i have been looking at some tutorials of Minifi. I am a little confused as to how the NiFi server knows where the data is coming from if you have multiple minifi agents sending data to the same remote process group. On the server, the input port is ingesting data from these devices, how does it tell which data came from a particular device?

Thanks

1 ACCEPTED SOLUTION

avatar
Super Collaborator

Hi @Roger Young,

Haven't played with Minifi but with Nifi in general source origin is a Flow File attribute which you can find under the Attributes tab when viewing a Flow File under the data provenance menu.

/Best regards, Mats

View solution in original post

4 REPLIES 4

avatar
Super Collaborator

Hi @Roger Young,

Haven't played with Minifi but with Nifi in general source origin is a Flow File attribute which you can find under the Attributes tab when viewing a Flow File under the data provenance menu.

/Best regards, Mats

avatar
Expert Contributor

ok thank you.

avatar
Master Guru

There are currently a couple of options...

If you just want to figure out where a flow file came from for troubleshooting/debugging, then using provenance can tell you this by looking at the transit URI of the RECEIVE event.

If you want to make a decision somewhere in your NiFi flow based on which MiNiFi sent the flow file, then currently you would need set an attribute on the MiNiFi side like "minifi.host = ${hostname()}" in an UpdateAttribute processor, so that when it got transferred to NiFi that attribute would be there.

There is a pull request open to make NiFi automatically create this attribute for you when receiving the flow files via site-to-site, so basically the same info that is available on the RECEIVE event would be available in attributes:

https://issues.apache.org/jira/browse/NIFI-2585

https://github.com/apache/nifi/pull/1320

avatar
Expert Contributor

Thank you for the reply, much appreciated.