NIFI-7534 Consume MQTT Processor. Support Expression Language for Topic Filter property

Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>

This closes #4573.
This commit is contained in:
kpsngh1998 2020-10-06 08:35:00 +05:30 committed by Pierre Villard
parent 82d3fd6cd6
commit a95ffce6bd
No known key found for this signature in database
GPG Key ID: F92A93B30C07C6D5
1 changed files with 2 additions and 2 deletions

View File

@ -101,7 +101,7 @@ public class ConsumeMQTT extends AbstractMQTTProcessor implements MqttCallback
.name("Topic Filter")
.description("The MQTT topic filter to designate the topics to subscribe to.")
.required(true)
.expressionLanguageSupported(ExpressionLanguageScope.NONE)
.expressionLanguageSupported(ExpressionLanguageScope.VARIABLE_REGISTRY)
.addValidator(StandardValidators.NON_BLANK_VALIDATOR)
.build();
@ -222,7 +222,7 @@ public class ConsumeMQTT extends AbstractMQTTProcessor implements MqttCallback
super.onScheduled(context);
qos = context.getProperty(PROP_QOS).asInteger();
maxQueueSize = context.getProperty(PROP_MAX_QUEUE_SIZE).asLong();
topicFilter = context.getProperty(PROP_TOPIC_FILTER).getValue();
topicFilter = context.getProperty(PROP_TOPIC_FILTER).evaluateAttributeExpressions().getValue();
if (context.getProperty(PROP_GROUPID).isSet()) {
topicPrefix = "$share/" + context.getProperty(PROP_GROUPID).getValue() + "/";