Step 2- Configure the WatcherSubscriber
This section describes how to configure the WatcherSubscriber to receive information from the Watcher regarding changes in records, and then execute specified actions for the matched conditions.
- Download JRE version 1.8 from the Java download page.
- Download the following files:
- A valid certificate and private key. You can download the certificate and private key for the current session from the Tools > Certificate Tools page.
Connect WatcherSubscriber to the server
You can store configurable properties in an application.properties file and place it in the same directory as the JAR file. Each parameter is stored as a pair of strings, one storing the name of the parameter, and the other storing the value. For example, The parameters set from the command line have precedence over the properties file in the project directory.
dataLocation is the parameter and
datafiles is the value.
Each parameter is stored as a pair of strings, one storing the name of the parameter, and the other storing the value. For example,
The parameters set from the command line have precedence over the properties file in the project directory.
To start the WatcherSubscriber:
- If the configuration is defined in an application.properties file, in a terminal session, navigate to the location of the directory containing the .jar files and run the following command:
- To pass the parameters in the command line arguments, navigate to the location of the directory containing the .jar files and run the following command:
-Dloader.path is the path to the list of plugin (jar) files and
-classpath is the entry to the main class using a properties file that is included in the JAR file.
The table lists, and describes the configuration values you can set when starting the WatcherSubscriber:
|Properties (Command Line)||Description|
Required. The relative or absolute path.
You can download the certificate and private key for the current session from the Tools > Certificate Tools page.
|Required. The URL of the Gospel UI.|
Required. The version of the Gospel API.
Message logging is disabled by default. When enabled, the logs are saved to the file system as a text file.
The record definition to which the logs are written. Ensure that the record definition has required permissions, and contains fields message and
The port number for the Gospel user interface.
|The password used for logging on to the UI. the password for this session will be randomly generated and displayed in the terminal.|
The maximum number of attempts for failed actions.
You can set the following severity level of the messages to control the type of messages displayed on the console.
Mail Plugin Settings
|The sender's name as it appears in sent emails|
|The password for the email|
|The host IP address of the outgoing mail server|
Set to true if the server requires authentication
|The email address used to send notifications, that is the 'sender address'|
The port number used by the outgoing mail server
Set if the outgoing mail server supports SSL (Secure Sockets Layer)
Set if the outgoing mail server supports TLS (Transport Layer Security)
Set to True if TLS is required
Call Plugin Settings
The maximum time for a connection to be established.
In HTTP, the User-Agent string is often used for content negotiation, where the origin server selects suitable content or operating parameters for the response. For example, the User-Agent string might be used by a web server to choose variants based on the known capabilities of a particular version of client software.
SDK requests timeout
Time in minutes between each set of metrics that will be reported. Set value to 0 to disable.
Metrics log level
Time to wait before fetching blocks after receiving a message from the WebSocket (in milliseconds)
Maximum number of attempts for the BackOff mechanism
Maximum number of attempts for BackOff mechanism for watcher action
Maximum number of attempt for BackOff mechanism for watcher definitions
Maximum number of attempt for BackOff mechanism for block retrieval
- The WatcherSubscriber Administrative Panel > Config Builder page displays the configuration currently applied when starting the WatcherSubscriber. On this page, you can modify the required configuration and generate a configuration file using the Download Config option. Save the file to the WatcherSubscriber directory as application.properties and restart the WatcherSubscriber to apply the new configuration.
By default, the following timeout properties are set to infinite in the JavaMail Session object. This causes the mail to wait indefinitely for the SMTP server to respond. You can add the following properties to the application.properties and provide a value for the timeout period in milliseconds:
Below is an example of the application.properties file containing the available configurations that can be provided when starting the WatcherSubscriber: