nabmoh123 commented on a change in pull request #4939:
URL: https://github.com/apache/nifi/pull/4939#discussion_r607722789
##########
File path:
nifi-nar-bundles/nifi-amqp-bundle/nifi-amqp-processors/src/main/java/org/apache/nifi/amqp/processors/AbstractAMQPProcessor.java
##########
@@ -55,18 +57,26 @@
*/
abstract class AbstractAMQPProcessor<T extends AMQPWorker> extends
AbstractProcessor {
+ public static final PropertyDescriptor BROKERS = new
PropertyDescriptor.Builder()
+ .name("Brokers")
+ .description("A comma-separated list of known AMQP Brokers in the
format <host>:<port> (e.g., localhost:5672). If this is " +
+ "set, Host Name and Port are ignored. Only include hosts
from the same AMQP cluster.")
+ .required(false)
+
.expressionLanguageSupported(ExpressionLanguageScope.VARIABLE_REGISTRY)
+ .addValidator(StandardValidators.HOSTNAME_PORT_LIST_VALIDATOR)
+ .build();
public static final PropertyDescriptor HOST = new
PropertyDescriptor.Builder()
.name("Host Name")
- .description("Network address of AMQP broker (e.g., localhost)")
- .required(true)
+ .description("Network address of AMQP broker (e.g., localhost). If
Brokers is set, then this property is ignored.")
+ .required(false)
.defaultValue("localhost")
.expressionLanguageSupported(ExpressionLanguageScope.VARIABLE_REGISTRY)
- .addValidator(StandardValidators.NON_EMPTY_EL_VALIDATOR)
+
.addValidator(StandardValidators.ATTRIBUTE_EXPRESSION_LANGUAGE_VALIDATOR)
Review comment:
I wanted to allow for this value to be empty, since BROKERS can now be
supplied instead of HOST. But after some testing I've noticed that by providing
a default value for HOST then it can never be empty, the default value will
override empty values. So I can revert this change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]