title: Multiple spring task executors with annotation-driven spring tasks
body: <p>I have a class <code>MessageProcessor</code> being called by another method in another class (i.e. Caller).</p>
  
  <pre><code>public class Caller {
  @Scheduled(filxedDelay=10)
  public void poll(){
  //do stuff
  messageProcessor.process(msg);
  }
  
  }
  
  public class MessageProcessor{
  
  @Async(value="abcExecutor")
  public void process(String msg){
  //do stuff here.
  }
  
  }
  </code></pre>
  
  <p>Spring file looks like:</p>
  
  <pre><code>&lt;task:executor id="abcExecutor" pool-size="9" rejection-policy-"CALLER_RUNS"/&gt;
  </code></pre>
  
  <p>I want to add another @Async executor:</p>
  
  <pre><code> @Async(value="defExecutor")
      public void remove(String msg){
      //do stuff here.
      }
  
  @Scheduled(filxedDelay=10)
  public void kill(){
  //do stuff
  messageProcessor.remove(msg);
  }
  </code></pre>
  
  <p>By adding another executor in spring file:</p>
  
  <pre><code>&lt;task:executor id="defExecutor" pool-size="9" rejection-policy="CALLER_RUNS"/&gt;
  </code></pre>
  
  <p>But how to add multiple executors in <code>&lt;task:annotation-driven executor="abcExecutor" scheduler="scheduler" mode="proxy" proxy-target-class="true"/&gt;</code></p>
  
  <p>How can I make these multiple executors run with annotation?</p>
  
  <p><strong>PS</strong>: Obviously, I don't want to have the same pool being used for both the
     <code>@Async</code> methods</p>