- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How does the input port know which device data is coming from?
- Labels:
-
Apache MiNiFi
-
Apache NiFi
Created 12-14-2016 12:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Created 12-14-2016 01:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Created 12-14-2016 01:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Created 12-14-2016 01:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok thank you.
Created 12-14-2016 02:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
Created 12-16-2016 12:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the reply, much appreciated.