Hi

You ought to be able to use Camel's property placeholder
http://camel.apache.org/using-propertyplaceholder.html



On Mon, Dec 9, 2013 at 6:02 PM, Robert Dare <[email protected]> wrote:
> Hello,
>
> I am using the org.apache.camel.Consume annotation to consume messages in
> Java from an ActiveMQ queue.  I can configure the concurrentConsumers via
> the URI parameter in the annotation:
>
> @Consume(uri="activemq:queue:MyQueueName?concurrentConsumers=5")
>
> How can I externalize the concurrentConsumer configuration so that it can
> come from a properties file and not require a build/package/deploy cycle to
> configure?
>
> Is something like this possible?
>
> @Consume(uri="activemq:queue:MyQueueName?concurrentConsumers=${consumer.count}")
>
> Where ${consumer.count} is a value in the Spring application context,
> loaded via the PropertyPlaceholderConfigurer?
>
> As it seems now, I would need to re-write all my @Consume annotations and
> XML routes to be Java based.  Using a property via the application context
> seems like a much shorter path.
>
> Kind regards,
>
> Robert



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [email protected]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to