How to use Camel property notation {{...}} in the cMQConnectionFactory component

Problem Description

Setting the Broker URI parameter in the cMQConnectionFactory component with "{{activemq_url}}" results in the following error message:

 

Invalid broker URI: {{activemq_url}}

 

Root Cause

After configuring a property component, the camel property syntax {{...}} can be used directly in most Talend components; however, there are a few exceptions. The cMQConnectionFactory component is one of those exceptions where you can't directly use the {{...}} syntax.

 

Solution

Instead of using "{{activemq_url}}" in the Broker URI parameter, call the Camel resolvePropertyPlaceholders method, as shown below:

 

camelContext.resolvePropertyPlaceholders("{{activemq_url}}")
Version history
Revision #:
2 of 2
Last update:
‎01-29-2020 06:22 AM
Updated by:
 
Contributors
Comments
Community Manager

This article will be merged into the Talend Help Center per DOCT-13331.