Reference: Client Configuration

This chapter deals with the available configuration options of nJAMS Client for Mule4. The examples shown refer to the use of the nJAMS configuration file. But this chapter is also useful for learning about the different configuration options while using the Inline configuration.

The configuration file resides in <your-project>/src/main/resources/njams/. Use an editor of your choice and edit according to your needs.


Any change in this configuration file requires a re-start of the MuleSoft Runtime Engine instances.



Enables/disables nJAMS Client for Mule4:

true disables nJAMS Client for Mule4.

false enables nJAMS Client for Mule4 (default).


Enables/disables Reply functionality of nJAMS Client for Mule4.

true enables Replay.

false disables Replay.


Controls, when nJAMS Client for Mule4 should send error events.

true automatically creates error events for catched and uncatched exceptions.

false automatically creates error events only for uncatched exceptions (default).


The following properties control the communication between nJAMS Client for Mule4 and nJAMS Cloud, respectively nJAMS Server.


Select type of communication with nJAMS Cloud instance, respectively nJAMS Server instance:

CLOUD nJAMS Client for Mule4 communicates with an nJAMS Cloud instance. This setting is used, if you are using nJAMS Cloud service.

JMS nJAMS Client for Mule4 communicates with nJAMS Server instance via JMS. This settings is used for using nJAMS Server on premise.

In case you are using nJAMS Cloud:

The following properties have to be configured to allow nJAMS Client for Mule4 to create a secure connection via https to a designated nJAMS Cloud instance. You can find the configuration of the Cloud Data Provider within the Instance Setup of your Integration Matters account. A subscription of nJAMS Cloud is required.
 Refers to absolute path of the API key file.
 Endpoint of Integration Matters client hub. Default is and does not need to be changed.
 Refers to absolute path of the client certificate file.
 Refers to absolute path of the instance id file related to your nJAMS Cloud instance.
 Refers to absolute path of the private key file.

Sample configuration of a Cloud Data Provider:

## SDK configuration
# Communication settings

# Cloud Data Provider: = /njams/prod01/1b7e71187c-api.key = = /njams/prod01/1b7e71187c-certificate.pem = /njams/prod01/1b7e71187c-instanceId = /njams/prod01/1b7e71187c-private.pem.key

In case you are using JMS:

 Sets the connection factory, for example “ConnectionFactory”.
 Use a valid JMS user that has the required privileges to send and receive messages on the destinations defined in njams.sdk.communication.jms.destination.
 The JMS user’s password.
 The JMS destination name prefix. The prefix will be extended with .event for event messages send by nJAMS Client for Mule4 and .commands for messages send from the server to the nJAMS Client for Mule4. Default is njams.
 Name of the JMS destination that is used to send commands from nJAMS Server to nJAMS Client for Mule4. This setting is optional and only used, if you want to use a dedicated topic commands.
 Sets the JNDI context factory.
 Set JNDI user name.
 Set JNDI user’s password.
 The JNDI server connection url. Fault-tolerant or load-balanced URLs are supported.

Sample configuration of a JMS Data Provider using ActiveMQ:

## SDK configuration
# Communication settings

# JMS settings

# JNDI settings\://localhost\:61616

Sample configuration of a JMS Data Provider using TIBCO EMS:

## SDK configuration
# Communication settings

# JMS settings

# JNDI settings


nJAMS Subagent is used to provide metrics information collected from nJAMS Client for Mule4 to an nJAMS Agent. The nJAMS Agent in turn forwards metrics information to nJAMS Argos, which is part of nJAMS Server.

The following properties configure nJAMS Subagent:


Turn on/off nJAMS Subagent.

true enables nJAMS Subagent.

false disables nJAMS Subagent (default).

Name of the server that hosts nJAMS Agent service. Enter a hostname or ip-address, default is


Port number of nJAMS Agent service, default is 6450.

Sample settings for Subagent:

# Enable Subagent and configure against nJAMS Agent on localhost:

Configuration provider

nJAMS Client for Mule4 must persist dynamic configuration information such as Trace Points and Extracts. The client offers different options to persist that configuration: objectsore or file.

When deploying to MuleSoft CloudHub any restart of the application will erase any configuration stored in a local file. To overcome this and retain settings over the application’s lifecycle, using a persistent objectstore is the best option.


Specifies configuration provider, respectively the location where nJAMS Client for Mule4 stores the application based configuration.

objectstore sets the configuration provider to use (persistent) object store (default).

file stores configuration on storage device.

memory just temporarily stores configuration in memory.

The name of the object store to use. Default is _defaultPersistentObjectStore.


Defines how frequently to refresh the configuration in the objectstore in minutes. Default is 60 minutes. MuleSoft CloudHub will expire objectstore entries after 30 days of inactivity.


The path to the configuration file to use. If not set, the following default value will be used: <MULE_WORKING_DIRECTORY>/njams/<njams.client.sdk.domain>_<njams.client.sdk.deployment>_<njams.client.sdk.engine>.json Must end with .json suffix, when pointing to a file. If the path points to an existing file, that file will be used. If it points to a directory, a file with a default name will be created in that directory. Directories will be created automatically.

Sample configuration for using objectstore:

# Configuration store: objectstore

Memory Management

The following properties are not required to be changed in most cases. Please only change these values, if you are fully aware of the effects!


The discard policy determines how to deal with log messages, when maxQueueLength is exceeded.

none No message will be discarded, the Mule application will be blocked until queue size is below threshold (default).

discard will discard of the message.

OnConnectionLoss only discards log messages, if there is no connection available to JMS or to Cloud provider. Otherwise the Mule application is slowed down until all log messages are sent, respectively queue size is below threshold.


Period of time for collecting events in a message. Enter integer value in seconds. Default is 30.


Maximum internal message size. If size of internal message is reached, an instant push is triggered. Enter any integer value > 0 in Byte. Default is 5242880.


Minimum internal queue size to prepare log messages for sending. Enter any integer value > 0. Default is 1.


Maximum internal queue size to prepare log messages for sending. Enter any integer value > 0. Default is 8.


Idle connection timeout to close and remove JMS connection in msec. Default is 10000.

Data Masking


Data Masking allows you to mask particular parts of the log message, which should remain confidential. Assume you have Tracing enabled for an activity that processes password information. By default, the nJAMS UI provides Trace Data including the password information in plain text. To prevent password information from being shown in plain text, you can use data masking.

This property corresponds to property njams.sdk.datamasking.regex.<your-regex-name>, which specifies the data masking pattern.

true enables data masking (default). Use njams.sdk.datamasking.regex.<your-regex-name> to specify data masking pattern.

false disables data masking.


Use a regular expression to specify a pattern for data masking.

For example, the following regular expression replaces any information that matches a Social Security Number (SSN) with an asterisk character (“*”):

njams.sdk.datamasking.regex.maskSSN = (?!000|666)[0-8][0-9]{2}-(?!00)[0-9]{2}-(?!0000)[0-9]{4}

You can specify multiple regex definitions by defining further properties of regular expressions:




Additional properties

The following properties are not required to be changed in most cases.

 Specifies domain name.
 Specifies deployment name.
 Specifies application name.

Sample configuration of nJAMS Client for Mule4 taxonomy:

# Taxonomy:


When you are using Mule RTF it is recommended to configure the taxonomy in order to avoid getting new entries in the domain object tree each time you start the Mule application.

Use encrypted passwords

In njams configuration files passwords are usually entered in plain text, such as njams.sdk.communication.jms.password=foo. In case you do not want to use uncoded passwords, you can use encrypted passwords as follows:

Assume, the password of your JMS account is foo:

  1. Call java -jar njams-sdk-4.x.x.jar foo will output encrypted password: ??0190029006d0048004c0055000c0017002d00090005006a004d007100b500bd
  2. Place encrypted password into at njams.sdk.communication.jms.password=??0190029006d0048004c0055000c0017002d00090005006a004d007100b500bd
  3. Restart Mule application to make change effective