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

Reply via email to