Reputation: 150
I am exploring options for Transferring single Flowfile to two or more Relationships in my custom processor,i didn't found any help in documentation for this, Does this feature supported by NIFI?
Example Code:
session.transfer(flowFile, REL_SUCCESS_1);
session.transfer(flowFile, REL_SUCCESS_2);
Upvotes: 3
Views: 936
Reputation: 28564
you can use session.clone()
method:
FlowFile flowFile2 = session.clone(flowFile);
session.transfer(flowFile, REL_SUCCESS_1);
session.transfer(flowFile2, REL_SUCCESS_2);
to create a full clone of the flow file.
the content and attributes will be the same...
Upvotes: 7