-
1. Re: Properties unavailable when Exchange originates from another Camel Context
davsclaus Mar 2, 2012 2:58 AM (in response to futuredan)You need to setup property placeholder for both your camel contexts, as they are looked up at runtime as well when using Camel.
-
2. Re: Properties unavailable when Exchange originates from another Camel Context
futuredan Mar 2, 2012 8:56 AM (in response to davsclaus)Both have placeholders defined.
Main has the following:
-
3. Re: Properties unavailable when Exchange originates from another Camel Context
davsclaus Mar 2, 2012 11:04 AM (in response to futuredan)There was a bug in an older Camel release when sending an Exchange over VM between properties.
Are you using a recent version of Camel? What version are you using? You may try to upgrade.
-
4. Re: Properties unavailable when Exchange originates from another Camel Context
futuredan Mar 2, 2012 11:09 AM (in response to davsclaus)Thank you for the information.
I tried to remind myself to include version information, but forgot by the time I reached the end of my post.
We are using FUSE 4.3.1-01-15, which uses Camel 2.6.0-fuse-01-15 (I believe).
Do you know when it was fixed?
Is there some workaround besides upgrading Camel?
We are being used as a framework, so upgrading would be quite disruptive and we'd like to avoid that as a solution if at all possible.
-
5. Re: Properties unavailable when Exchange originates from another Camel Context
davsclaus Mar 2, 2012 12:04 PM (in response to futuredan)When sending between CamelContext over VM, then you possible have to copy the Exchange and set a the correct CamelContext.
See the preapareExchange method of the seda endpoint
-
6. Re: Properties unavailable when Exchange originates from another Camel Context
futuredan Mar 2, 2012 2:46 PM (in response to davsclaus)Thanks once again for the information.
Let me just make sure I understand your advice.
Would I create a bean that contains the code from the prepareExchange method?
And then insert it into my existing route like the following:
$</simple>
</setHeader>
I think I would create a custom Camel endpoint so that I could have access to the correct Camel context.
Does the above sound correct?
-
7. Re: Properties unavailable when Exchange originates from another Camel Context
davsclaus Mar 4, 2012 8:29 AM (in response to futuredan)I suggest to test that each of the camel applications works independetly. For example kicking off a route using a timer endpoint. And make sure the properties resolver works.
Then you know that its when you send from one camel to another over VM that you have this problem. If thats the case then its most likely due to that bug I talked above before.