Hi... the config is misleading you here... sorry about that. In fact, changing maxThreads has no effect on any of the gateways. To increase the number of threads used by the JBR server, you need to make a JBR specific config. You can do this on the jbr-provider, jbr-bus or jbr-listener by adding a property element... name="jbr-maxThreads" value="100" etc
you could also try some more reasonable value based on the number of CPU cores in your system. What JMS provider are you using? You could try jms-jca-provider.
You mention that setting the maxThreads has no affect on the gateway. In that case, how do you configure the number of threads on a jms-provider?
as statet in Tom's reply, you have to specify it using a property like the following one:
<property name="jbr-maxThreads" value="4" />
Thanks for the reply.
I think Tom's solution only applies to a jbr-provider. I am using a jms-provider.
Does tom's statement "changing maxThreads has no effect on any of the gateways", apply to all gateways or just the jbr-gateway?
We have tried setting the maxThreads property on the service and service.listeners.jms.listener. After logging the threadID in the action, I can see that four threads are being used for the action pipeline. However, my cpu utilization suggest that only one cpu is being used by the JBoss server (I have 4 cpus). I am not using persistent JMS queues.
Here's a simplified jboss-esb.xml for our scenario:
<jbossesb> <providers> <jms-provider name="JBM" connection-factory="ConnectionFactory" > <jms-bus busid="jmsGatewayBus" > <jms-message-filter dest-type="QUEUE" dest-name="jms_queue" /> </jms-bus> </jms-provider> </providers> <services> <service category="jms_simple" name="SimpleListener" description="jms_simple"> <property name="maxThreads" value="4" /> <listeners> <jms-listener name="JMS-Gateway" busidref="jmsGatewayBus" is-gateway="true" maxThreads="4" /> </listeners> <actions mep="OneWay"> <action name="action1" class="com.example.SimpleAction" process="handle"/> </actions> </service> </services> </jbossesb>
it applies just to JBR gateways. If you see 4 threads, then you are doing everything all right on your part. I can't see any issues with your configuration except for the line with property definition, which is IMHO redundant and ignored:
<property name="maxThreads" value="4" />
I'll delve a bit deeper and see where the bottleneck is.