You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Mark <el...@gmail.com> on 2016/11/02 19:11:06 UTC

route message based on system property

I would like the ability to route a message based on the value of a
property contained in a property file.  My route receives data and in some
debugging situations I'd like to write the data to disk.  So if I set a
property in a config file I would like files to be written to disk using
the "file" component.  Is this possible within Camel?

Re: route message based on system property

Posted by Tomohisa Igarashi <tm...@gmail.com>.
Hi,

There's a properties component:
http://camel.apache.org/properties.html

But if it's just a system property or ENV, you can refer it via simple expression on a condition, sys.foo or sysenv.foo:
http://camel.apache.org/simple.html

Thanks,
Tomo

On 11/03/2016 04:11 AM, Mark wrote:
> I would like the ability to route a message based on the value of a
> property contained in a property file.  My route receives data and in some
> debugging situations I'd like to write the data to disk.  So if I set a
> property in a config file I would like files to be written to disk using
> the "file" component.  Is this possible within Camel?
>