Defining multiple threads for serial and parallel listeners

By default, WebSphere Commerce configuration provides two inbound listeners: one serial listener and one parallel listener. To use multiple inbound queues, you must define multiple inbound listeners for WebSphere MQ. To add another listener:

Procedure

  • To increase the number of threads for serial listeners:
    1. Define JMS queue destinations in WebSphere Application Server Administrative Console. See Creating WebSphere MQ messaging provider queue destinations for more information.
    2. Create a backup copy of the instance_name.xml file, enabling you to revert back to the original file if any errors occur.
    3. Open the instance_name.xml file in a text editor and 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> 
      
    4. 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>
      
      Note:
      • 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.
    5. Restart WebSphere Commerce Server for the changes to take effect.
  • To increase the number of threads running parallel to the listener:
    1. Open the Configuration Manager.
    2. Navigate to WebSphere Commerce > node_name > Commerce > Instance List > instance_name > Transports > InboundListener for WebSphere MQ (JMS_Inbound)-Parallel.
    3. Increase the number of threads in the Threads property.
    4. Click Apply.
  • After your changes are applied, you must:
    Important:
    • Update the database connection pool to increase the maximum size by the same amount increased in this task.

      See WebSphere Application Server considerations for more information.

    • Increase the number of maximum connections under the reserved work manager.
      1. Open the WebSphere Application Server Administration Console.
      2. Navigate to Work manager > reserved.
      3. Under Thread pool properties, enter the value for the Maximum number of threads property.
      4. Save your changes.