Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am using Talend ESB, and have been using context variables (with implicit context load from file) in data integration jobs. Now I have created a route to read from RabbitMQ. However, implicit load of context variables does not work.
In the route, I am trying to set the RabbitMQ connection string dynamically, so that I will be able to pass the host, vhost, port, user, password loaded from a file (in the same way I pass connection parameters to MS SQL Server in the data integration jobs).
I am trying to construct the connection string as follows:
"rabbitmq://" + context.RabbitMQ_Host + ":" + context.RabbitMQ_Port + "/DataExchange?vhost=" + context.RabbitMQ_VHost +"&exchangeType=topic&autoDelete=false&queue=Submitted_Record&username="+context.RabbitMQ_User + "&password=" + context.RabbitMQ_Password
The issue is that implicit load of context variables does not work in routes for some reason. (Note that when I set the value of these context parameters hardcoded in Talend, it works).
After searching it seems that I have two options:
1) using a route_name.cfg file in the MyDrive:\TOS_ESB-20200219_1130-V7.3.1\Runtime_ESBSE\container\etc folder - I tried this but the parameters are not being picked up when I run the job for some reason
2) using property placeholders and modifying the Spring XML to load values from a file and use them at runtime
I have also found links to what others said was a very useful post (https://edwardost.github.io/cloud/platform/soa/2015/05/14/Working-with-Property-Placeholders-in-Tale...) but this seems to have been removed unfortunately.
I would really appreciate if someone can help me out please as I am stuck on this. Unfortunately I do not have much Java and Spring experience and I couldn't manage to figure this out.
Any help and pointers would be greatly appreciated.
Many thanks,
David