NIFI-7534 Consume MQTT Processor. Support Expression Language for Topic Filter Property#4573
NIFI-7534 Consume MQTT Processor. Support Expression Language for Topic Filter Property#4573kpsngh1998 wants to merge 1 commit intoapache:mainfrom
Conversation
…ic Filter property
|
Any reason for not using parameters? |
|
@pvillard31 Could you elaborate which parameters? Are you asking about parameters of evaluateAttributeExpressions() method? If yes, since possible parameters are related to Flowfiles and ConsumeMQTT don't have any incoming flowfile, so didn't use any parameter. |
|
On your process group, you can associate a parameter context where you can define your parameters. Parameters are referenced by using |
|
I'd also add that with the addition of this concept of parameters (as a far better replacement of the variables), expression language should only be set where it makes sense to call some EL functions or to reference attributes of incoming flow files. But I'm not sure this is required for this specific use case since it does not accept incoming connections. Having said that, your change is valid from a code point of view, so I can merge it if there is use case that requires it. |
|
Thanks for sharing info on parameters. Regarding EL usecase, I couldn't think of any atleast for MQTT source except only when you have topicName present in some registry file and you want to access it using EL. This jira was already raised so i picked it up as my first PR. |
|
That's fine, it's not causing any issue and could be useful for people not willing to move to parameters right away. But going forward we really want to have people using Parameters instead of Variables. |
pvillard31
left a comment
There was a problem hiding this comment.
Thanks for the contribution @kpsngh1998
…ic Filter property Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com> This closes apache#4573.
…ic Filter property Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com> This closes apache#4573.
…ic Filter property Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com> This closes apache#4573.
…ic Filter property Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com> This closes apache#4573.
…ic Filter property Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com> This closes apache#4573.
NIFI-7534 Consume MQTT Processor. Support Expression Language for Topic Filter Property
Thank you for submitting a contribution to Apache NiFi.
Please provide a short description of the PR here:
Description of PR
Added variable registry expression language support for Topic Filter property.
Note: Flowfile attribute expression lanuguage support is not added since evaluation is done in OnScheduled and no flowfile is available there.
Enables X functionality; fixes bug NIFI-7534.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:
Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
Has your PR been rebased against the latest commit within the target branch (typically
main)?Is your initial contribution a single, squashed commit? Additional commits in response to PR reviewer feedback should be made on this branch and pushed to allow change tracking. Do not
squashor use--forcewhen pushing to allow for clean monitoring of changes.For code changes:
mvn -Pcontrib-check clean installat the rootnififolder?LICENSEfile, including the mainLICENSEfile undernifi-assembly?NOTICEfile, including the mainNOTICEfile found undernifi-assembly?.displayNamein addition to .name (programmatic access) for each of the new properties?For documentation related changes:
Note:
Please ensure that once the PR is submitted, you check GitHub Actions CI for build issues and submit an update to your PR as soon as possible.