title: How can I set the message processor interval parameter using a non fixed value? (using a value stored in a property\registry\etc)
body: <p>I am very new to <strong>WSO2 ESB</strong> and I have the following problem with a message processor.</p>
  
  <p>I have this message processor definiation that every second extract an element (an XML document previously stored) from a queue and process it calling a sequence named <strong>transferProcessorSequence</strong>. This is the configuration:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;messageProcessor class="org.apache.synapse.message.processor.impl.sampler.SamplingProcessor" messageStore="transferFromMessageStore" name="transferFromMessageProcessor" xmlns="http://ws.apache.org/ns/synapse"&gt;
      &lt;parameter name="sequence"&gt;transferProcessorSequence&lt;/parameter&gt;
      &lt;parameter name="interval"&gt;1000&lt;/parameter&gt;
      &lt;parameter name="is.active"&gt;true&lt;/parameter&gt;
      &lt;parameter name="concurrency"&gt;1&lt;/parameter&gt;
  &lt;/messageProcessor&gt;
  </code></pre>
  
  <p>It works fine. My problem is that I have not to do it every second (it should not be a fixed value) but have to use a value that I have stored into a registry (eventually I can store this value elsewhere).</p>
  
  <p>Instead of having this setting:</p>
  
  <pre><code>&lt;parameter name="interval"&gt;1000&lt;/parameter&gt;
  </code></pre>
  
  <p>I have to retrieve a stored value from a registry or something like this (also a property).</p>
  
  <p>How can I do something like this?</p>
  
  <p>**EDIT 1: I am trying to follow the solution provided by Jean-Michel but I am finding some difficulties trying to build my project with Maven.</p>
  
  <p>I created a simple Maven project, this is my <strong>pom.xml</strong> file content (at this time I have yet no implemented the Java class, I am only trying to compile an empty project):</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.mycompany.toolkit&lt;/groupId&gt;
      &lt;artifactId&gt;SamplingProcessorHeaderRateLimitation&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;bundle&lt;/packaging&gt;
      &lt;name&gt;Sampling Processor Header Rate Limitation&lt;/name&gt;
      &lt;description&gt;Custom Sampling Mesageprocessor using response header to implement the rate limitation&lt;/description&gt;
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.7&lt;/source&gt;
                      &lt;target&gt;1.7&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.felix&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-bundle-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.3.4&lt;/version&gt;
                  &lt;extensions&gt;true&lt;/extensions&gt;
                  &lt;configuration&gt;
                      &lt;instructions&gt;
                          &lt;Bundle-SymbolicName&gt;com.sample.messageprocessor&lt;/Bundle-SymbolicName&gt;
                          &lt;Bundle-Name&gt;com.sample.messageprocessor&lt;/Bundle-Name&gt;
                          &lt;Export-Package&gt;com.sample.*&lt;/Export-Package&gt;
                          &lt;DynamicImport-Package&gt;*&lt;/DynamicImport-Package&gt;
                          &lt;Implementation-Build&gt;${buildNumber}&lt;/Implementation-Build&gt;
                          &lt;Scm-Root&gt;${project.scm.connection}&lt;/Scm-Root&gt;
                      &lt;/instructions&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;releases&gt;
                  &lt;updatePolicy&gt;daily&lt;/updatePolicy&gt;
                  &lt;checksumPolicy&gt;ignore&lt;/checksumPolicy&gt;
              &lt;/releases&gt;
              &lt;id&gt;wso2-nexus&lt;/id&gt;
              &lt;url&gt;http://maven.wso2.org/nexus/content/groups/wso2-public/&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
      &lt;pluginRepositories&gt;
          &lt;pluginRepository&gt;
              &lt;releases&gt;
                  &lt;updatePolicy&gt;daily&lt;/updatePolicy&gt;
                  &lt;checksumPolicy&gt;ignore&lt;/checksumPolicy&gt;
              &lt;/releases&gt;
              &lt;id&gt;wso2-nexus&lt;/id&gt;
              &lt;url&gt;http://maven.wso2.org/nexus/content/groups/wso2-public/&lt;/url&gt;
          &lt;/pluginRepository&gt;
      &lt;/pluginRepositories&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.synapse&lt;/groupId&gt;
              &lt;artifactId&gt;synapse-core&lt;/artifactId&gt;
              &lt;version&gt;2.1.7-wso2v3&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-logging&lt;/groupId&gt;
              &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
              &lt;version&gt;1.1.1&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
      &lt;properties&gt;
          &lt;CApp.type&gt;lib/synapse/mediator&lt;/CApp.type&gt;
      &lt;/properties&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>The problem is that when I perfrom the <strong>mvn package</strong> statment for this Maven project I obtain the following error message:</p>
  
  <pre><code>nobil@DESKTOP-VCON7T6 MINGW64 ~/OneDrive/Documenti/MyCompany/JAVA/workspace-sts-3.8.4.RELEASE/SamplingProcessorHeaderRateLimitation
  $ mvn -e package
  [INFO] Error stacktraces are turned on.
  [INFO] Scanning for projects...
  [INFO]
  [INFO] ------------------------------------------------------------------------
  [INFO] Building Sampling Processor Header Rate Limitation 0.0.1-SNAPSHOT
  [INFO] ------------------------------------------------------------------------
  [INFO]
  [INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ SamplingProcessorHeaderRateLimitation ---
  [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
  [INFO] Copying 0 resource
  [INFO]
  [INFO] --- maven-compiler-plugin:2.0:compile (default-compile) @ SamplingProcessorHeaderRateLimitation ---
  [INFO] Nothing to compile - all classes are up to date
  [INFO]
  [INFO] --- maven-resources-plugin:3.0.2:testResources (default-testResources) @ SamplingProcessorHeaderRateLimitation ---
  [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
  [INFO] Copying 0 resource
  [INFO]
  [INFO] --- maven-compiler-plugin:2.0:testCompile (default-testCompile) @ SamplingProcessorHeaderRateLimitation ---
  [INFO] Nothing to compile - all classes are up to date
  [INFO]
  [INFO] --- maven-surefire-plugin:2.20:test (default-test) @ SamplingProcessorHeaderRateLimitation ---
  [INFO]
  [INFO] --- maven-bundle-plugin:2.3.4:bundle (default-bundle) @ SamplingProcessorHeaderRateLimitation ---
  [WARNING] Warning building bundle com.mycompany.toolkit:SamplingProcessorHeaderRateLimitation:bundle:0.0.1-SNAPSHOT : Instructions in Export-Package that are never used: com\.sample\..*|com\.sample
  Classpath: Jar:.,Jar:synapse-core,Jar:org.wso2.securevault,Jar:axiom-api,Jar:geronimo-activation_1.1_spec,Jar:geronimo-javamail_1.4_spec,Jar:jaxen,Jar:geronimo-stax-api_1.0_spec,Jar:axiom-impl,Jar:wstx-asl,Jar:log4j,Jar:jline,Jar:commons-cli,Jar:commons-io,Jar:commons-codec,Jar:synapse-commons,Jar:commons-dbcp,Jar:commons-pool,Jar:activation,Jar:axis2-transport-base,Jar:snmp4j-agent,Jar:snmp4j,Jar:axis2-transport-http,Jar:spring-core,Jar:commons-vfs2,Jar:cache-api,Jar:commons-net,Jar:oro,Jar:javax.servlet-api,Jar:bcpkix-jdk15on,Jar:bcprov-jdk15on,Jar:synapse-tasks,Jar:quartz,Jar:c3p0,Jar:slf4j-api,Jar:geronimo-jta_1.1_spec,Jar:commons-collections,Jar:synapse-nhttp-transport,Jar:httpcore,Jar:httpcore-nio,Jar:httpclient,Jar:wso2caching-core,Jar:axis2-clustering,Jar:tomcat-tribes,Jar:tomcat-juli,Jar:tomcat-embed-logging-juli,Jar:xmlunit,Jar:aspectjweaver,Jar:jms,Jar:amqp-client,Jar:antlr-runtime,Jar:stringtemplate,Jar:antlr,Jar:axis2-saaj,Jar:geronimo-saaj_1.3_spec,Jar:axiom-dom,Jar:axis2-kernel,Jar:geronimo-ws-metadata_2.0_spec,Jar:servlet-api,Jar:commons-httpclient,Jar:commons-fileupload,Jar:wsdl4j,Jar:XmlSchema,Jar:woden-api,Jar:XmlSchema,Jar:woden-impl-dom,Jar:woden-impl-commons,Jar:jsr311-api,Jar:junit,Jar:hamcrest-core,Jar:handy-uri-templates,Jar:commons-lang,Jar:jettison,Jar:jettison,Jar:stax-api,Jar:json-path,Jar:json-smart,Jar:wso2eventing-api,Jar:axis2-adb,Jar:sandesha2-core,Jar:axis2-codegen,Jar:neethi,Jar:axis2-mtompolicy,Jar:saxon-dom,Jar:saxon,Jar:xalan,Jar:serializer,Jar:xml-apis,Jar:axis2-transport-local,Jar:json-schema-validator-all,Jar:json-schema-validator,Jar:jsr305,Jar:joda-time,Jar:libphonenumber,Jar:mailapi,Jar:jopt-simple,Jar:json-schema-core,Jar:rhino,Jar:uri-template,Jar:guava,Jar:msg-simple,Jar:btf,Jar:jackson-coreutils,Jar:jackson-databind,Jar:jackson-annotations,Jar:jackson-core,Jar:commons-logging
  
  [WARNING] Warning building bundle com.mycompany.toolkit:SamplingProcessorHeaderRateLimitation:bundle:0.0.1-SNAPSHOT : Superfluous export-package instructions: [com.sample.*]
  [ERROR] Error building bundle com.mycompany.toolkit:SamplingProcessorHeaderRateLimitation:bundle:0.0.1-SNAPSHOT : The JAR is empty: dot
  [ERROR] Error(s) found in bundle configuration
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 3.568 s
  [INFO] Finished at: 2017-07-17T14:25:45+02:00
  [INFO] Final Memory: 16M/284M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.felix:maven-bundle-plugin:2.3.4:bundle (default-bundle) on project SamplingProcessorHeaderRateLimitation: Error(s) found in bundle configuration -&gt; [Help 1]
  org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.felix:maven-bundle-plugin:2.3.4:bundle (default-bundle) on project SamplingProcessorHeaderRateLimitation: Error(s) found in bundle configuration
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
          at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
          at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
          at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
  Caused by: org.apache.maven.plugin.MojoExecutionException: Error(s) found in bundle configuration
          at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:341)
          at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:224)
          at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:215)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
          ... 20 more
  Caused by: org.apache.maven.plugin.MojoFailureException: Error(s) found in bundle configuration
          at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:293)
          ... 24 more
  [ERROR]
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR]
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
  </code></pre>
  
  <p>So, why? What is the problem? I think that maybe I have to configure the <strong>manven-bundle-plugin</strong> plugin. But what exactly have I to do to correctly configure it? And what this plugin does?</p>