With Talend ESB, how to override a route context parameter on runtime ?

Four Stars

With Talend ESB, how to override a route context parameter on runtime ?

Hello everyone, and thanks for reading me, I try to deploy a route built with Talend Open Studio For Esb, 6.5, on windows server 2016 Datacenter
To do so I built the route, then manually dropped the file on the container/deploy folder.

Then using client.bat I tried to set some configuration parameters to override values defined in the context of the project (in my case the name of an sqs-queue), but it does not work.

First of all, is it the right approach to configure parameters for a Route ?

Things I have done :

  • unzipped the zip file to disk D
  • followed the stepd to install the wrapper as a windows service
  • client.bat >
    • config:edit MyRouteName
    • config: property-set myProp myValue
    • config:update
    • refresh (also tried bundle:refresh)
    • stop MyRouteName
    • start MyRouteName

Did I missed something ?

Is there a way to check what parameters are actually applied to the Route ? Is the .cfg file read watched continuously for changes (I also tried to edit it manually) ?


Four Stars

Re: With Talend ESB, how to override a route context parameter on runtime ?

Florian - 


I'm relatively new at this, but here are some thoughts: 

  1. Yes, the files are read dynamically and the changes should be instantaneous. If you look at the Apache Karaf documentation on configs, you can see that the two methods (config: or editing the file) are interchangeable. In addition, "If you provide a configuration PID that doesn’t exist yet, Apache Karaf will create a new configuration (and so a new configuration file) automatically." 
  2. That said, I'm not sure you can overwrite a specific context variable within your context file, but you can switch the context using these commands. So if you had a different contexts established in the Studio for each of your sqs-queues (i.e. sqs-queue1, sqs-queue2, sqs-queue3, etc.), you could switch between them by: 
config:edit MyRouteName
config: property-set context sqs-queue1

You could then verify the changes with: 

config:list "(service.pid=MyRouteName)"

... I think.