title: @RabbitListener - defining queues from properties
body: <p>Can a comma separated property be used to define the queues on which to listen?  The intent is to be able to change queue names and number of queues without code change.</p>
  
  <p>I've defined queues in my <code>application.properties</code> like so:</p>
  
  <pre><code>my.aggregate.queues=/some/queue,/some/other/queue
  </code></pre>
  
  <p>I am able to include the queue names as lists by using <a href="http://docs.spring.io/spring-framework/docs/current/spring-framework-reference/html/expressions.html" rel="nofollow">SpEL</a> as so:</p>
  
  <pre><code>@Value("#{'${my.aggregate.queues}'.split(',')}")
  </code></pre>
  
  <p>However, when I attempt to listen to the queues using the <code>@RabbitListener</code> annotation I find I must define the queues individually.  Using </p>
  
  <pre><code>@RabbitListener(queues = { "#{'${my.aggregate.queues}'.split(',')}" })
  </code></pre>
  
  <p>causes the queue names to be resolved to a string array, but not one capable of being used:</p>
  
  <pre><code>@RabbitListener can't resolve '[Ljava.lang.String;@5396eeb1' as either a String or a Queue
  </code></pre>
  
  <p>I've tried various other SpEL combinations without success.  Is there a way of using SpEL to dynamically define the queues?</p>