Mark Payne commented on NIFI-2794:

[~pvillard] - the problem with what you have laid out above is that in order 
for this to work, you'd need to be able to guarantee that the queues between 
B/D and C/D are "in sync" so that the first FlowFile in B/D matches up with the 
first FlowFile in C/D and the second FlowFile in B/D matches up with the second 
FlowFIle in C/D, etc. NiFi does not provide any sort of ordering guarantee that 
spans multiple connections. Instead, the approach that we take is to have 
processor A add some sort of "correlation id" attribute, and then let D group 
the FlowFiles by this attribute internally. This is how Merge Content works, 
for example. Using this approach, we can guarantee that FlowFiles are properly 
grouped together, and it means that we don't need to care about how many 
incoming Connections a Processor has.

> Expose a getOneFromEachConnection method in ProcessSession
> ----------------------------------------------------------
>                 Key: NIFI-2794
>                 URL: https://issues.apache.org/jira/browse/NIFI-2794
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework
>    Affects Versions: 1.0.0
>            Reporter: Pierre Villard
>            Assignee: Pierre Villard
>            Priority: Minor
>         Attachments: image.png
> In case a processor has multiple incoming connections, it could be 
> interesting to expose a method allowing users to get exactly one flow file 
> per incoming connection in a row.
> That could unlock opportunities such as performing join operations on 
> datasets.

This message was sent by Atlassian JIRA

Reply via email to