How to configure SDK Adapter with the ability of reconnecting to the JMS server automatically

How to configure SDK Adapter with the ability of reconnecting to the JMS server automatically

book

Article ID: KB0085422

calendar_today

Updated On:

Products Versions
TIBCO Adapter SDK -
Not Applicable -

Description

Description:
Description:
============
TIBCO SDK Adapter can be configured as trying to reconnect to JMS server in the case of JMS session turned into invalid.

Environment:
===========
TIBCO Adapters and custom SDK Adapters

Resolution:
==========
In order to implement it, we would need to do the following configuration steps: -

1) Change the JMS provider URL.
From
    "tcp://&ltip address>:&ltport>"
To
    "tcp://&ltip address>:&ltport>,tcp://&ltip address>:&ltport>".   If you are using a single JMS Server.
    "tcp://&ltip address>:&ltport>,tcp://&ltip address 2>:&ltport>". If you are using multiple JMS Servers, for fault tolerance.

You can specify the JMS provider URL directly by Designer; or you can also use Global Variable for the JMS provider URL and specify its value in the Adapter tra file by using "tibco.clientVar.JmsProviderUrl" property.

Besides, if you are using JMS Server with JNDI Lookups, you can also change the JMS provider URL directly in the JMS factories configuration file. Please refer to TIBCO Enterprise Message Service User’s Guide for more details on this.

2) Specify the JMS reconnection parameters for custom Adapter.
You can do it by specifying the following properties in the Adapter tra file: -
tibco.jmsReconnectCount=100   (number of reconnect attempts)
tibco.jmsReconnectDelay=2000  (in milliseconds)

Or you can also do it by specifying the following parameters in the command line of running your Adapter: -
-system:jmsreconnectcount=100   (number of reconnect attempts)
-system:jmsreconnectdelay=2000  (in milliseconds)

Issue/Introduction

How to configure SDK Adapter with the ability of reconnecting to the JMS server automatically