title: Configuring multiple queues with a topic exchange and using routing key to direct the message specific queue with spring cloud streams
body: <p>Configuring multiple queues with a topic exchange and using routing key to direct the message specific queue with spring cloud streams</p>
  
  <p>My requirement is example I have the queues and exchange defined as below in consumer end</p>
  
  <pre><code>spring.cloud.stream.bindings.inputA.destination=Common-Exchange
  spring.cloud.stream.bindings.inputA.group=A-Queue
  
  spring.cloud.stream.bindings.inputB.destination=Common-Exchange
  spring.cloud.stream.bindings.inputB.group=B-Queue
  </code></pre>
  
  <ul>
  <li>I should be able to specify the routing key in the consumer just like
  we do it in AMQP where we can pass the exchange queue and routing key
  to create the binding</li>
  <li><p>I should be able to set the routing key when sending the message in
  producer end using MessageBuilder</p>
  
  <p>channel.send(MessageBuilder.withPayload(message).build())</p></li>
  </ul>
  
  <p>Of course we can use one queue and use headers to direct different type of messages but I need to know how multiple queue connected to a single exchange work with streams.</p>