title: Spring integration JMS IBM mq configuration to read message from one queue and send it to six different queue
body: <p>Hi I am new to Spring integration. I want to write code from scratch to read message from one JMS queue and send it to seven different queue. 
  I need to use IBM Mq. Can anyone share the sample code with me. I have written below xml. 
  I have created one reader queue and seven writer queue. And used recipient-list-router to route it from reader queue to writer queue.</p>
  
  <p>Can somebody confirms whether its right or wrong.</p>
  
  <p>jms-xml.</p>
  
  <p>
          
  
  <pre><code>        This adapter reads message from one queue and duplicate it and writes it in multiple queues.
  
      ]]&gt;
  &lt;/description&gt;
  
  &lt;bean id="jmsConnectionFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory"&gt;
      &lt;property name="transportType" value="${jms.transportType}"/&gt;
      &lt;property name="queueManager" value="${jms.queueManager}"/&gt;
      &lt;property name="hostName" value="${jms.hostName}"/&gt;
      &lt;property name="port" value="${jms.port}" /&gt;
      &lt;property name="channel" value="${jms.channel}"/&gt;
  &lt;/bean&gt;
  
  
  &lt;bean id="readerQueue" class="com.ibm.mq.jms.MQQueue"&gt;
      &lt;constructor-arg index="0" value="${jms.queueManager}"/&gt;
      &lt;constructor-arg index="1" value="${jms.receiver.queue.name}"/&gt;
  &lt;/bean&gt;
  
  &lt;bean id="writerQueue2" class="com.ibm.mq.jms.MQQueue"&gt;
      &lt;constructor-arg index="0" value="${jms.queueManager}"/&gt;
      &lt;constructor-arg index="1" value="${jms.receiver.queue.name}"/&gt;
  &lt;/bean&gt;
  
  &lt;bean id="writerQueue3" class="com.ibm.mq.jms.MQQueue"&gt;
      &lt;constructor-arg index="0" value="${jms.queueManager}"/&gt;
      &lt;constructor-arg index="1" value="${jms.receiver.queue.name}"/&gt;
  &lt;/bean&gt;
  &lt;bean id="writerQueue4" class="com.ibm.mq.jms.MQQueue"&gt;
      &lt;constructor-arg index="0" value="${jms.queueManager}"/&gt;
      &lt;constructor-arg index="1" value="${jms.receiver.queue.name}"/&gt;
  &lt;/bean&gt;
  &lt;bean id="writerQueue5" class="com.ibm.mq.jms.MQQueue"&gt;
      &lt;constructor-arg index="0" value="${jms.queueManager}"/&gt;
      &lt;constructor-arg index="1" value="${jms.receiver.queue.name}"/&gt;
  &lt;/bean&gt;
  &lt;bean id="writerQueue6" class="com.ibm.mq.jms.MQQueue"&gt;
      &lt;constructor-arg index="0" value="${jms.queueManager}"/&gt;
      &lt;constructor-arg index="1" value="${jms.receiver.queue.name}"/&gt;
  &lt;/bean&gt;
  
  &lt;bean id="writerQueue7" class="com.ibm.mq.jms.MQQueue"&gt;
      &lt;constructor-arg index="0" value="${jms.queueManager}"/&gt;
      &lt;constructor-arg index="1" value="${jms.receiver.queue.name}"/&gt;
  &lt;/bean&gt;
  
  
  &lt;jms:channel id="readerChannel" queue-name="readerQueue" connection-factory="jmsConnectionFactory"/&gt;
  &lt;jms:channel id="writerChannel1" queue-name="writerQueue1" connection-factory="jmsConnectionFactory"/&gt;
  &lt;jms:channel id="writerChannel2" queue-name="writerQueue2" connection-factory="jmsConnectionFactory"/&gt;
  &lt;jms:channel id="writerChannel3" queue-name="writerQueue" connection-factory="jmsConnectionFactory"/&gt;
  &lt;jms:channel id="writerChannel4" queue-name="writerQueue4" connection-factory="jmsConnectionFactory"/&gt;
  &lt;jms:channel id="writerChannel5" queue-name="writerQueue5" connection-factory="jmsConnectionFactory"/&gt;
  &lt;jms:channel id="writerChannel6" queue-name="writerQueue6" connection-factory="jmsConnectionFactory"/&gt;
  &lt;jms:channel id="writerChannel7" queue-name="writerQueue7" connection-factory="jmsConnectionFactory"/&gt;
  </code></pre>
  
  
          
      -->
  
  <pre><code>&lt;int:recipient-list-router id="customRouter" input-channel="readerChannel"
                             timeout="1234"
                             ignore-send-failures="true"
                             apply-sequence="true"&gt;
      &lt;int:recipient channel="writerChannel1"/&gt;
      &lt;int:recipient channel="writerChannel2"/&gt;
      &lt;int:recipient channel="writerChannel3"/&gt;
      &lt;int:recipient channel="writerChannel4"/&gt;
      &lt;int:recipient channel="writerChannel5"/&gt;
      &lt;int:recipient channel="writerChannel6"/&gt;
      &lt;int:recipient channel="writerChannel7"/&gt;
  &lt;/int:recipient-list-router&gt;
  
  
  
  &lt;bean id="receiverJMSTemplate" class="org.springframework.jms.core.JmsTemplate"&gt;
      &lt;property name="connectionFactory" ref="jmsConnectionFactory" /&gt;
      &lt;property name="pubSubDomain" value="false"/&gt;
      &lt;property name="receiveTimeout" value="30000"/&gt;
  &lt;/bean&gt;
  </code></pre>