vkcelik commented on a change in pull request #3246: NIFI-5929 Support for IBM
MQ multi-instance queue managers
URL: https://github.com/apache/nifi/pull/3246#discussion_r274847188
##########
File path:
nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/cf/JMSConnectionFactoryProvider.java
##########
@@ -210,17 +218,23 @@ private void
setConnectionFactoryProperties(ConfigurationContext context) {
if (descriptor.isDynamic()) {
this.setProperty(propertyName, entry.getValue());
} else {
- if (propertyName.equals(BROKER)) {
- String brokerValue =
context.getProperty(descriptor).evaluateAttributeExpressions().getValue();
- if
(context.getProperty(CONNECTION_FACTORY_IMPL).evaluateAttributeExpressions().getValue().startsWith("org.apache.activemq"))
{
+ if (descriptor == BROKER_URI) {
+ String brokerValue =
context.getProperty(BROKER_URI).evaluateAttributeExpressions().getValue();
+ String connectionFactoryValue =
context.getProperty(CONNECTION_FACTORY_IMPL).evaluateAttributeExpressions().getValue();
+ if
(connectionFactoryValue.startsWith("org.apache.activemq")) {
this.setProperty("brokerURL", brokerValue);
+ } else if
(connectionFactoryValue.startsWith("com.tibco.tibjms")) {
+ this.setProperty("serverUrl", brokerValue);
} else {
+ // Try to parse broker URI as colon separated
host/port pair
String[] hostPort = brokerValue.split(":");
+ // If broker URI indeed was colon separated host/port
pair
if (hostPort.length == 2) {
this.setProperty("hostName", hostPort[0]);
this.setProperty("port", hostPort[1]);
- } else if (hostPort.length != 2) {
- this.setProperty("serverUrl", brokerValue); // for
tibco
+ } else if
(connectionFactoryValue.startsWith("com.ibm.mq.jms")) {
+ // Assuming IBM MQ style broker was specified,
e.g. "myhost(1414)" and "myhost01(1414),myhost02(1414)"
+ this.setProperty("connectionNameList",
brokerValue);
Review comment:
@ijokarumawak
Unfortunately the test will be delayed a few weeks due to busyness and
easter vacation
----------------------------------------------------------------
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]
With regards,
Apache Git Services