TIBCO Streaming JMS Reconnect Configuration

TIBCO Streaming JMS Reconnect Configuration

book

Article ID: KB0073852

calendar_today

Updated On:

Products Versions
TIBCO Streaming 10

Description

Using the default JMS configuration as shown here, if the EMS server abruptly disconnects from the Streaming application, the application does not attempt to reconnect. Even if the EMS server becomes available later, the JMS adapter does not automatically reconnect to it.

JMS Reconnection settings with default Retry Count = Unlimited, Retry Interval = 30 seconds

Issue/Introduction

The workaround for not reconnecting using default settings is to explicitly set maxReconnectAttempts to a non-default value.

Resolution

The default settings:
  •   Retry Count = Unlimited 
  •   Retry Interval = 30 seconds
do not actually write any configuration into the JMS HOCON configuration file, and this is interpreted as if Retry Count were set to zero (0) meaning no retry attempts. This is known defect SB-50314 and will be fixed in a version after this writing (Feb 2021, version 10.6.1).

The workaround is to set these to non-default values. Add non-default values to the JMS configuration for every separate server defined within the file, as so:
   jmsServers = {     EMS-SERVER = {       ...       maxReconnectAttempts = 1000       reconnectSleepSeconds = 20       ...
You may make this change either in the JMS Configuration Editor in Studio, or with a text editor (be careful to follow HOCON format). 

You may use any numeric value for maxReconnectAttempts (in the range 0 to 2147483647), but there is no working setting for "Unlimited". Any large value that when multiplied by the reconnectSleepSeconds translates to several days is effectively unlimited. For example, a 5 second sleep multiplied by 50400 reconnection attempts will attempt reconnection for a full week. A maxReconnectAttempts value of zero (0) results in no reconnection attempts.