How do I calculate the connections required for QueueConnection, QueueSessions, and QueueReceivers?

How do I calculate the connections required for QueueConnection, QueueSessions, and QueueReceivers?

book

Article ID: KB0084910

calendar_today

Updated On:

Products Versions
TIBCO SmartMQ -
Not Applicable -

Description

Resolution:
To calculate the connections required for QueueConnection, QueueSessions, and QueueReceivers, you have to take a number of factors into consideration.

1. Non-Transacted Queue Sessions, with Synchronous Queue Receivers
There is always a QueueConnection object which is one connection to mqi. When the session is non-transacted and has synchronous QueueReceivers, then each receiver has a connection to SmartMQ. So, with one session with one synchronous queue receiver there are two connections. If there are multiple sessions, then each session will have it's own connection to SmartMQ. Since sessions are independent of each other, one session can be transacted while the other may not be.

2. Non-Transacted Queue Session with asynchronous Queue Receivers
There is the main connection as well as the queue receiver having it's own connection. For asynchronous queue receivers there is a browser thread that has it's own connection
which is browsing the queue checking to see if there are messages in the queue. The main session thread won't block if the queue doesn't have any messages. Therefore, we have
three connections in this case.

3. Transacted Queue Session, with Synchronous Queue Receivers
There is the main connection and the session uses the same main connection. The Queue Receiver also uses the main connection so there is always one connection.

4. Transacted Queue Session, with Asynchronous Queue Receivers.
There is the main connection and the session uses the same main connection. The Queue Receiver also uses this session's connection. Since it's asynchronous there is a browser thread (which has its own connection) and checks the queue for any messages. The reason for this is that the session itself may have more then one queue receiver browsing on different queues and one queue can have a message while the other may not. Therefore, we have two connections in this case.

Issue/Introduction

How do I calculate the connections required for QueueConnection, QueueSessions, and QueueReceivers?