Connect on Demand Feature for JMS Adapter
[connection] [connection on demand] [JMS] [JMS Adapter] [keep alive] [m]
Related:
- JMS Adapter: On Demand Connection (New Feature)Symptom A new feature has been introduced in the JMS...
Symptom
You are using the SAP PI JMS Adapter with IBM MQ as the JMS Provider and notice that connections to MQ are reaching the maximum limit.
In addition, performance and stability issues are noticed for handling large volumes of messages, since connections are maintained throughout the channel lifecycle. A large number of TCP/IP open connections are created.
Other terms
JMS, JMS Adapter, connection, jms, connection on demand, keep alive, maximum no of connections, performance, IBM MQ, MQ
Reason and Prerequisites
Prior to this new feature, connections were created on channel startup and then closed on a channel stop only. Operating several channels with a high message load, lead to exhaustion of connections and resources from SAP PI JMS Adapter to IBM MQ. Besides, usage of workarounds on the receiver side like “CONNECTION_TEST_POLL”, created an additional TCP/IP connection(per receiver channel), adding to the overhead. This in turn necessitated a more flexible and leaner approach for connection handling, on a per message/demand basis.
Solution
The solution is to provide an on-demand connection handling in the PI JMS Receiver Adapter, to open and close connections on demand. This will necessitate changes in the configuration of JMS receiver channels, so that, the end users can explicitly configure 2 parameters to enable the option on a need basis as follows:
a) A checkbox “Create Connection on Demand” is available that will be unchecked by default. By explictly selecting this option, the above optimization feature will be activated.
b) If “Create Connection on Demand” is checked, then a text field “Keep Connection Alive Period” can be used to specify the time interval for which the above connection will be alive. Default value is zero seconds, i.e. the connection will be closed once the JMS message is transferred to the Partner system i.e IBM MQ. Specify any other value to ensure the same connection is re-used for bulk messages that arrive into the same JMS receiver channel, within a short period of time.
It is to be noted that during the existing keep alive period, if another message comes in, then, the existing keep alive job is terminated and a new job is created(based on the values configured in the communication channel).
The above solution is available from PI 7.0(SP 16 onwards) release.
For PI 7.0 release(SP 16,17 and 18), there are changes to the Adapter Metadata that are provided as an attachment. The new Adapter Metadata has to be uploaded to the affected systems(after removing the old xml metadata content entirely and inserting the new metadata) via the SAP BASIS contents in the Integration Repository. The correct location wherein the adapter metadata can be uploaded is attached. From PI 7.0 SP 19 onwards, the adapter metadata would be available as part of the official content delivery process. For the earlier SP’s, kindly use the attached metadata.
Please note that this feature is not part of XI 3.0 release.
The archives and the support package stack guide can be found on the SAP Service Marketplace as described in SAP Note 952402.