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:

To use multiple inbound queues, define multiple inbound listeners for WebSphere MQ.


To increase the number of threads for serial listeners

  1. Define JMS queue destinations in WebSphere Application Server

  2. Create a backup copy of instance.xml.

  3. 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> 
    

  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>
    

    • 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 | Transports | InboundListener for WebSphere MQ (JMS_Inbound)-Parallel

  3. Increase the number of threads in the Threads property.

  4. Click Apply.


After the changes are applied

After the changes are applied, :

  1. Update the database connection pool to increase the maximum size by the same amount increased in this task.

  2. 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 | Thread pool properties

      ...and enter a value for the property...

      Maximum number of threads

    3. Save the changes.


Related concepts

WebSphere Application Server considerations


+

Search Tips   |   Advanced Search