Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
Is it possible to define the destination queue of the cJMS component dynamically?
I tried to define the destination by a context variable but if I change the value of the context variable within the route, the new value is not known in the cJMS component.
Any ideas?
thanks, laci
"MYQUEUE"
"cMQConnectionFactory1:queue:"+"${in.header.MYQUEUE}"
Yes, just have to change the "CamelJmsDestinationName" header and that's all
One thing to understand with contexts is they behave completly differet in routes/camel than in jobs. They are read at route startup but if you change their values they never will be taken in account. So they are only constant values. Headers and properties are the main stuff for dynamic variables.
Loko
Hey Loko,
that's not exactly true! Have a look hereto check out how to change your contexts with the help of external config files - it's pretty useful!
Thanks for the tip about the JMS Header!
David.
maybe I'm not understanding you correctly...
Here's an example of what I mean:
Simple REST Service set-up
Contents of cSetBody with context variable usage
Context variable initialisation
GET REST call with browser
Getting ID
Updating config for the already deployed service
Second GET REST call to service after update
Can you show me an example of what you mean? I'm still quite new to Routes in Talend ESB and still trying to get my head around them, so it's quite possible that I'm missing something. In any case, if you have anything to teach me about Routes, I'll gladly take the advice!
Thanks,
David.