nifi
nifi copied to clipboard
NIFI-8233 ListenHTTP - Add ability to filter incoming flowfile attributes
Summary
This gives ListenHTTP the ability to control its attributes when incoming data is a flowfile.
Currently, ListenHTTP doesn't control attributes it gets when the file it receives is a flowfile. They are automatically passed along.
So for instance, if ListenHttp receives a file in flowfile format (sent by the PostHTTP processor). the attributes it had when leaving PostHTTP will remain with the flowfile passing through ListenHTTP as well..
This allows users to control that with new property:
FlowFile Attributes to receive as Attributes (Regex)
Default value is set to .* to maintain backward compatiblity
Similar functionality already exists with the current
HTTP Headers to receive as Attributes (Regex) attribute
but this doesn't cover the use case where incoming data is in flowfile format.
so this will now cover that as well.
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
- [x] Apache NiFi Jira issue created
Pull Request Tracking
- [x] Pull Request title starts with Apache NiFi Jira issue number, such as
NIFI-00000 - [x] Pull Request commit message starts with Apache NiFi Jira issue number, as such
NIFI-00000
Pull Request Formatting
- [x] Pull Request based on current revision of the
mainbranch - [x] Pull Request refers to a feature branch with one commit containing changes
Verification
Please indicate the verification steps performed prior to pull request creation.
Build
- [x] Build completed using
mvn clean install -P contrib-check- [x] JDK 8
- [x] JDK 11
- [x] JDK 17
Licensing
- [x] New dependencies are compatible with the Apache License 2.0 according to the License Policy
- [x] New dependencies are documented in applicable
LICENSEandNOTICEfiles
Documentation
- [x] Documentation formatting appears as expected in rendered files
I hear you. A user that asked me for this as they like using PostHTTP and didn't like following up with the UpdateAttribute, but you are correct.
Still hopeful another reviewer will think this is a useful addition :)
I hear you. A user that asked me for this as they like using PostHTTP and didn't like following up with the UpdateAttribute, but you are correct.
Still hopeful another reviewer will think this is a useful addition :)
Thanks for the reply @NissimShiman! I appreciate the contribution and feedback.
We're marking this PR as stale due to lack of updates in the past few months. If after another couple of weeks the stale label has not been removed this PR will be closed. This stale marker and eventual auto close does not indicate a judgement of the PR just lack of reviewer bandwidth and helps us keep the PR queue more manageable. If you would like this PR re-opened you can do so and a committer can remove the stale tag. Or you can open a new PR. Try to help review other PRs to increase PR review bandwidth which in turn helps yours.