Apache camel ApacheCamel:使用节流:如何使用配置文件更改timePeriodMillis的值?

Apache camel ApacheCamel:使用节流:如何使用配置文件更改timePeriodMillis的值?,apache-camel,activemq,blueprint-osgi,throttling,Apache Camel,Activemq,Blueprint Osgi,Throttling,我使用apache camel蓝图中的节流阀:throttle timePeriodMillis=“1000” 常数=4时 我想使用占位符动态放置timePeriodMillis的值。这可能吗?请参阅文档: 这里可以使用XML DSL属性组件中为任何类型的属性使用属性占位符的部分 例: Properties properties = new Properties(); InputStream input = null; public void configure() throws IOEx

我使用apache camel蓝图中的节流阀:throttle timePeriodMillis=“1000” 常数=4时 我想使用占位符动态放置timePeriodMillis的值。这可能吗?

请参阅文档:


这里可以使用XML DSL属性组件中为任何类型的属性使用属性占位符的部分

例:

Properties properties = new Properties(); 
InputStream input = null;


public void configure() throws IOException {

   CamelContext context = new DefaultCamelContext();    

   input = new FileInputStream("sample.properties");
   properties.load(input);

   System.out.println("CITY IS" +properties.getProperty("wl.city"));
   String city = properties.getProperty("wl.city");