@Adam JThe Remote Process Group (RPG) was not designed with any logic to make sure specific FlowFiles went to one node versus another. IT was designed to simply build a delivery model based on load on target NiFi cluster nodes. That delivery model will change potentially each time the lates cluster status is retrieved.
-
If you need to be very specific as to which node get a specific FlowFile, you best bet is to use a direct delivery dataflow design.
The best option here is to have your splitText processor send to a routeOnContent processor that sends the split with URL 1/2 to one new connection and the flowfile with url 3/4 to another connection. Each of these connections would feed to a different postHTTP processor (this processor can be configured to send as flowfile). One of the would be configured to send to a listenHTTP processor on node 1 and the other configured to point at same listenHTTP processor on node 2.
-
You may want to think about this setup from a HA standpoint. If you lose either node 1 or 2, those flowfiles will just stack up and not transfer until the node is back online. at the same time the other urls continue to transfer.
-
Something else you may want to look into is the new load-balanced connections capability introduced in NiFi 1.8:
https://blogs.apache.org/nifi/entry/load-balancing-across-the-cluster
-
There is a "Partition by Attribute" option with this new feature which would make sure flowfiles with matching attribute go to same node. While you still can't specify a specific node, it does allow similar flowfiles to get moved to same node. if node goes down you don't end up with an outage, but files with matching attributes will stay together going to different node that is still available.
-
Thanks,
Matt
-
If you found this answer addressed your question, please take a moment to login in and click the "ACCEPT" link.