Configuring the Internal Message Queue

When TIBCO ActiveMatrix Adapter for Database (TIBCO Business Studio) interacts with a TIBCO environment, the adapter first retrieves messages from a transport queue and caches them in the internal message queue for processing. You can configure the internal message queue to cater to the performance of the adapter.

Internal Message Queue Size

When the adapter retrieves messages from a transport queue and puts them in the internal queue, if the transport queue contains an excessively large number of messages and the size of the internal queue is not set or set to an excessively large value, the OutOfMemoryError error occurs.

To prevent the OutOfMemoryError error, you can set the adb.<sessionName/serviceName>.ADBQueueSize property in the adbagent.tra file to restrict the internal queue size.

However, you must set the internal queue size to a reasonable value; if the internal message queue size is set to an excessively small value, the adapter only handles the specified size number of messages at a time and has to wait for the timeout period of 500 ms (default timeout) to handle subsequent messages, which prolongs the message handling process. Setting of the ADBQueueSize property depends on the size of a single message and the value of the tibco.env.HEAP_SIZE property, especially when an excessively large number of records are sent to Subscription Service and the single message size is in the Mbit-level.

For details about the adb.<sessionName/serviceName>.ADBQueueSize property, see Adapter Properties.

Internal Message Queue Timeout

To compensate for the improper setting of the ADBQueueSize property, you can set the adb.<sessionName/serviceName>.ADBQueueTimeout property to control the timeout for processing messages. For example, if the internal queue size is set to an excessively small value, it is good practice to set the value of the adb.<sessionName/serviceName>.ADBQueueTimeout property to less than 500 ms (the default value) in the adbagent.tra file. This configuration helps improve the performance of the adapter.

Additionally, to ensure better performance of the adapter, it is good practice to set the value of the ADBQueueTimeout property based on the message size. For byte-level messages, set the value to a smaller value such as 20 ms; for Mbit-level messages, set the value to a larger value such as 200 ms.

For details about the adb.<sessionName/serviceName>.ADBQueueTimeout property, see Adapter Properties.