Multithreading and Session in Subscription Service

Configuring multithreading for Subscription Service depends on the session used for this type of service.

Default Session

If you do not want to use multithreading, Subscription Service services with the same transport type use the default session to receive messages and update the relevant tables in the database.

To use the default session, you have to keep the Use Separate Session check box cleared in the Subscription Options tab of the service.

Separate Session

If you want to use multithreading, you must configure Subscription Service to use separate sessions. To do this, finish the following configurations:
  1. Select the Use Separate Session check box in the Subscription Options tab of the service. The useSerial check box and the Number of Subscription Service Threads field are displayed.
  2. (Optional) Select the useSerial check box if you want messages to be handled in order.
    Note: To ensure the proper functioning of the useSerial option, note the following conditions:
    • The destination table must have a primary key.
    • If the destination table has no primary key column, you have to manually specify one or more columns by selecting the User Key check box. When processing the application requests, Subscription Service handles messages in order.
    • If the destination table has no primary key column and the User Key check box is cleared, it is good practice to clear the useSerial check box.
  3. Specify the number of Subscription Service threads.

The following table shows an example of configuration:

Note: When you configure a separate session to use multiple threads, the transport session name must end with one or more digits in the range 0 to 9.