Administer > Manage WebSphere Commerce features > Messaging system > WebSphere MQ
Define multiple threads for serial and parallel listeners
Overview
By default, WebSphere Commerce configuration provides two inbound listeners:
- one serial listener
- one parallel listener
To use multiple inbound queues, define multiple inbound listeners for WebSphere MQ.
To increase the number of threads for serial listeners
- Define JMS queue destinations in WebSphere Application Server
- Create a backup copy of instance.xml.
- Edit instance.xml locate the snippet that defines a default inbound listener:
<Inbound> <InboundSerialConnector TimeToReconnect="600" default="true" enabled="true" id="1" name="Listener for WebSphere MQ (JMS Inbound) - Serial"> </InboundSerialConnector>
- Add an additional definition:
<InboundSerialConnector TimeToReconnect="600" default="true" enabled="true" id="3" name="Listener for WebSphere MQ (JMS Inbound) - Serial - Custom"> <JNDI JndiName="eis/JCAJMS" display="false"/> <ConnectionSpec ClassName="com.ibm.commerce.messaging.adapters.jcajms.JCAJMSConnectionSpec" default="true"> <EditableProperty Admin="factory" display="false" editable="Yes" name="setConnectionFactory" value="JMSQueueConnectionFactory"/> <EditableProperty Admin="inQueue" display="false" editable="Yes" name="setInboundQueue" value="CustomJMSSerialInboundQueue"/> <EditableProperty Admin="errorQueue" display="false" editable="Yes" name="setErrorQueue" value="JMSErrorQueue"/> <EditableProperty Admin="outQueue" display="false" editable="Yes" name="setOutboundQueue" value="JMSOutboundQueue"/> </ConnectionSpec> <InteractionSpec ClassName="com.ibm.commerce.messaging.adapters.jcajms.JCAJMSInteractionSpec" default="true"> <EditableProperty Admin="timeOut" display="false" editable="Yes" name="setTimeOut" value="4"/> <EditableProperty Admin="mode" display="false" editable="Yes" name="setMode" value="2"/> </InteractionSpec> </InboundSerialConnector>
- Ensure that you substitute the correct JMS object names for the connection factories and queue destinations.
- Ensure that you set the id to a unique number.
- Restart WebSphere Commerce Server for the changes to take effect.
To increase the number of threads running parallel to the listener
- Open the Configuration Manager.
- Navigate to...
WebSphere Commerce | node_name | Commerce | Instance List | instance | Transports | InboundListener for WebSphere MQ (JMS_Inbound)-Parallel
- Increase the number of threads in the Threads property.
- Click Apply.
After the changes are applied
After the changes are applied, :
- Update the database connection pool to increase the maximum size by the same amount increased in this task.
- Increase the number of maximum connections under the reserved work manager.
- Open the WebSphere Application Server Administration Console.
- Navigate to...
Work manager | reserved | Thread pool properties...and enter a value for the property...
Maximum number of threads
- Save the changes.
Related concepts
WebSphere Application Server considerations