oscerd commented on a change in pull request #5319: URL: https://github.com/apache/camel/pull/5319#discussion_r610118445
########## File path: components/camel-huaweicloud-smn/src/main/java/org/apache/camel/component/huaweicloud/smn/SimpleNotificationProducer.java ########## @@ -204,15 +205,20 @@ private void validateAndInitializeSmnClient(SimpleNotificationEndpoint simpleNot clientConfigurations.setProjectId(simpleNotificationEndpoint.getProjectId()); } - //checking for region - String endpointUrl = SimpleNotificationUtils.resolveSmnServiceEndpoint(simpleNotificationEndpoint.getRegion()); - if (endpointUrl == null) { - if (LOG.isErrorEnabled()) { - LOG.error("Valid region not found"); - } - throw new IllegalArgumentException("enter a valid region"); + //checking for endpoint + if (StringUtils.isNotEmpty(simpleNotificationEndpoint.getEndpoint())) { + clientConfigurations.setServiceEndpoint(simpleNotificationEndpoint.getEndpoint()); } else { - clientConfigurations.setServiceEndpoint(endpointUrl); + //checking for region + String endpointUrl = SimpleNotificationUtils.resolveSmnServiceEndpoint(simpleNotificationEndpoint.getRegion()); Review comment: Here you're changing the basic behavior. So I think we need a note on the migration guide about endpoint with precedence on region. -- 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: us...@infra.apache.org