title: Spring Cloud Streams - Multiple dynamic destinations for sources and sinks
body: <p>There was a change request on my system, which currently listens to multiple channels and send messages to multiple channels as well, but now the destination names will be in the database and change any time.
  I'm having trouble believing I'm the first one to come across this, but I see limited information out there.</p>
  
  <p>All I found is these 2...<br/>
  Dynamic sink destination:
  <a href="https://github.com/spring-cloud-stream-app-starters/router/tree/master/spring-cloud-starter-stream-sink-router" rel="nofollow noreferrer">https://github.com/spring-cloud-stream-app-starters/router/tree/master/spring-cloud-starter-stream-sink-router</a>, but how would that work to active listening to those channels the way it's done by @StreamListener?</p>
  
  <p>Dynamic source destinations:
  <a href="https://github.com/spring-cloud/spring-cloud-stream-samples/blob/master/source-samples/dynamic-destination-source/" rel="nofollow noreferrer">https://github.com/spring-cloud/spring-cloud-stream-samples/blob/master/source-samples/dynamic-destination-source/</a>, which does this</p>
  
  <pre><code>@Bean
      @ServiceActivator(inputChannel = "sourceChannel")
      public ExpressionEvaluatingRouter router() {
          ExpressionEvaluatingRouter router = new ExpressionEvaluatingRouter(new SpelExpressionParser().parseExpression("payload.id"));
          router.setDefaultOutputChannelName("default-output");
          router.setChannelResolver(resolver);
          return router;
      }
  </code></pre>
  
  <p>But what's that "payload.id"? And where are the destinations specified there?? </p>