pvillard31 commented on code in PR #9776:
URL: https://github.com/apache/nifi/pull/9776#discussion_r1983008109
##########
nifi-extension-bundles/nifi-amqp-bundle/nifi-amqp-processors/src/main/java/org/apache/nifi/amqp/processors/AbstractAMQPProcessor.java:
##########
@@ -303,7 +311,8 @@ protected Connection createConnection(ProcessContext
context, ExecutorService ex
final ConnectionFactory cf = new ConnectionFactory();
cf.setUsername(context.getProperty(USER).evaluateAttributeExpressions().getValue());
cf.setPassword(context.getProperty(PASSWORD).getValue());
-
+
cf.setMaxInboundMessageBodySize(Integer.parseInt(context.getProperty(MAX_INBOUND_MESSAGE_BODY_SIZE).evaluateAttributeExpressions().getValue()));
+
Review Comment:
Then you can do something like:
````java
.addValidator(StandardValidators.createDataSizeBoundsValidator(1,
Integer.MAX_VALUE))
````
Using the data size approach makes it more user friendly as the user can
just provide something like '1 MB', etc.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]