How to open a new jms connection per thread when using jms outbound adapter?
<p>I have a spring integration JMS outbound gateway that I'm using to push messages to multiple queues in my queue manager. </p>

<pre><code>@Bean
public IntegrationFlow sendTo101flow() {
    return IntegrationFlows.from("sendTo101Channel")
            .handle(Jms.outboundAdapter(context.getBean("connection101", ConnectionFactory.class))
                .destinationExpression("headers." + HeaderKeys.DESTINATION_NAME)
                .configureJmsTemplate(jmsOutboundTemplateSpec())
                .get(), jmsOutboundEndpointSpec())
            .get();
}
</code></pre>

<p>I'm facing problems when we get concurrent requests with huge payloads which need to be inserted into the same queue. On inspection it looks like even though the threads trying to insert the message are separate, they're only allowed to do the insertion sequentially.</p>

<p>I have checked the mq documentation and it looks like actual parallel insertion will only work if <a href="http://www.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.dev.doc/q031020_.htm" rel="nofollow noreferrer">a new connection is opened for each message</a>.</p>

<p>Is there a way to make a JMS outbound gateway open a new connection per message? Or set the number of concurrent connections opened through it (like on the inbound side)?</p>