Announcement Announcement Module
No announcement yet.
MaximumConcurrentProducers for a jms:outbound-gateway Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • MaximumConcurrentProducers for a jms:outbound-gateway

    I have created the following set up :

    The sender service interface accepts Strings.
    These Strings are converted to a EBCDIC byte array which the outbound gateway posts on a queue.
    It waits for a response and then the reverse transformation is executed and the output is written to stdout.

    In the current confiuguration this is executed one by one.
    Changing the poller should probably introduce paralellism.
    Whoever say I change it to a taskexecutor with 50 threads, it is possible that this 50 outbound connections are in progress.
    I would like to be able to limit this to a certain number.
    With the inbound gateway there is a parameter called (Max)concurrentConsumers, is there a (Max)cocurrentProducer parameter or another way to solve this?

    I thought that during the sendAndReive call in the JmsOutboundGateway the thread would block and during this the thread would be used to start treating the next Message, but this doesn't seem to be the case.
    This way it is possible that all the threads in the pool are blocked doing I/O, while there actually are messages in the queues that should be threated during this time.
    Are these blocked threads during I/O returned to the threadpool or not ?

    <?xml version="1.0" encoding="UTF-8"?>
    <beans:beans xmlns=""
    	xmlns:xsi="" xmlns:beans=""
    	<jms:outbound-gateway id="jmsout"
    		reply-destination="replyQueue" request-destination="requestQueue"
    		request-channel="requestChannel" reply-channel="replyChannel">
    			<integration:interval-trigger interval="1000" />
    	<beans:bean id="connectionFactory"
    		<beans:property name="targetConnectionFactory" ref="mqQueueConnectionFactory" />
    		<beans:property name="sessionCacheSize" value="10" />
    		<beans:property name="cacheProducers" value="false"></beans:property>
    	<beans:bean id="mqQueueConnectionFactory" class="">
    		<beans:property name="queueManager" value="CM11"></beans:property>
    		<beans:property name="hostName" value="geMQCM11"></beans:property>
    		<beans:property name="port" value="1413"></beans:property>
    		<beans:property name="channel" value="GERE01.CM11.01"></beans:property>
    		<beans:property name="transportType" value="1"></beans:property>
    	<beans:bean id="requestQueue" class="">
    		<beans:property name="baseQueueName" value="GERE.QL.JRULES_BATCH_REQ.0001"></beans:property>
    	<beans:bean id="replyQueue" class="">
    		<beans:property name="baseQueueName" value="GERE.QL.JRULES_BATCH_RSP.0001"></beans:property>
    	<integration:poller id="poller" default="true">
    		<integration:interval-trigger interval="1000" />
    	<stream:stdout-channel-adapter id="stdout"
    		channel="EBCDICToASCIITransformerChannel" append-newline="true" />
    	<gateway id="sender" service-interface="Sender" />
    	<channel id="requestChannel" >
    		<queue capacity="10"/>
    	<channel id="replyChannel" >
    			<queue capacity="10"/>
    	<channel id="EBCDICToASCIITransformerChannel" >
    			<queue capacity="10"/>
    	<channel id="ASCIIToEBCDICTransformerChannel" >
    			<queue capacity="10"/>
    	<transformer input-channel="replyChannel"
    		output-channel="EBCDICToASCIITransformerChannel" ref="EBCDICToASCIITransformer"
    		method="convertToASCII" />
    	<transformer input-channel="ASCIIToEBCDICTransformerChannel"
    		output-channel="requestChannel" ref="ASCIIToEBCDICTransformer" method="convertToEBCDIC" />
    	<beans:bean id="EBCDICToASCIITransformer"
    		class="dexia.gemk.mainframe.ctg.EBCDICASCIITransformer" />
    	<beans:bean id="ASCIIToEBCDICTransformer"
    		class="dexia.gemk.mainframe.ctg.EBCDICASCIITransformer" />