User Tools

Site Tools


replicator_config

Core Configuration - config.xml

This configuration file is only applicable to versions older than 3.5, and it has been eliminated in version 3.5 and newer.

The Replicator configuration file config.xml is the first configuration file processed by the Replicator Agent. Its purpose is to provide the replicator agent with the information it requires to contact the Perspectium Message Bus and register the fact that it has started. The agent also uses the configuration for reporting the state and performance of the agent and its tasks. Additionally, it establishes the location of the configuration file directory which is referenced by other components of the Replicator Agent. All of these directives are required and the Replicator agent won’t start unless they’re provided.

Every replicator configuration file starts with the following directive:

<?xml version=“1.0” encoding=“ISO-8859-1” ?>

The config.xml file wraps all of its directives within the <config> and then <agent> elements as outlined below.

  <config>
      <agent>
          <!-- configuration directives goes here -->
      </agent>
  </config>

These tags are required. Only a single <agent> should be configured and it must enclose the desired <subscribe> and or <share> tags discussed within the agent configuration section.

Starting in version 3.2.4 the <agent> tag has been replaced with <common>.

  <config>
      <common>
          <!-- configuration directives goes here -->
      </common>
  </config>
  

The following table reflects required configuration directives prior to version 3.2.4:

Directive Example Use Default
amqp_uri <amqp_uri>amqp://localhost</amqp_uri> Primary Message Bus Location Required
amqp_user <amqp_user>joe</amqp_user> User for logging into primary bus Required
amqp_password <amqp_password>j_o_e</amqp_password> User's password for message bus Required

Starting in version 3.2.0, encrypted fields will be supported in the config.xml and agent.xml files. The installer will tag all password fields as encrypted by prefixing the value with “encrypt:”. When the agent starts, any configuration values prefixed with “encrypt:” will be encrypted and the configuration file will be rewritten.

Configuring the Transport Protocol

Starting in version 3.2.2, the ability to use the HTTP(S) protocol to communicate with the message bus is available. The transport protocols http and https can be used with the following directives:

amqp_uri and report_queue_uri

The configuration is simple, yet subtle. You simply change the 'scheme' used from amqp to http or https as reflected below in the example.

Directive Example Use Default
amqp_uri <amqp_uri>http://MessageBrokerService4.perspectium.com:8567</amqp_uri> Primary Message Bus Location Required
amqp_uri <amqp_uri>https://MessageBrokerService4.perspectium.com</amqp_uri> Primary Message Bus Location Required

Enabling use of an HTTP Proxy

Also available in relase 3.2.2 and newer is the ability to force HTTP(s) message bus traffic to traverse an HTTP(s) proxy. Several organizations use such a proxy to provide a more secure or controlled method in which to access servers within the Internet.

Once you've configured use of the HTTP or HTTPS protocol as described above you need to add a statement similar to the following to your configuration.

   <proxy_uri>http://192.168.40.131</proxy_uri>

OR

   <message_connection user="admin" password="****" proxy="http://192.168.40.131" queue="psp.in.servicenow">amqp://fqdn</message_connection>  

These examples will route all http(s) based traffic destined for a Perspectium Message Bus through the proxy 192.168.40.131. Note, that in this example the data is in clear text. In the following example the traffic to the proxy is encrypted via an SSL connection.

   <proxy_uri>https://192.168.40.131</proxy_uri>

Addtional Core Directives

The following table depicts additional core directives which have a default value.

Directive Example Use Default
config_file_directory <config_file_directory>../conf</config_file_directory> Directory containing all configuration files ../conf

The following table represents configuration options that when specified apply to all <task> elements defined within the agent.xml file unless specifically overridden within the <task> definition.

Directive Example Use Default
report_queue_uri <report_queue_uri>amqp://localhost</report_queue_uri> Message bus for reporting amqp://localhost
report_queue_user <report_queue_user>reporter1</report_queue_user> User for reporting Required
report_queue_password <report_queue_password>reporter1pass</report_queue_password> User password for reporting Required
polling_interval <polling_interval>20</polling_interval> Interval between each run 30 seconds
max_reads_per_connect <max_reads_per_connect>1500</max_reads_per_connect> Messages to process per interval 1000
max_writes_per_connect <max_writes_per_connect>1500</max_writes_per_connect> Messages to process per interval 1000

Starting in version 3.2.3 the following configuration directives are supported and should be used over previous directives.

3.2.3 Configuration transition

conf/config.xml directives

This approach has been deprecated.

  <amqp_uri>amqp://localhost</amqp_uri>
  <amqp_user>admin</amqp_user>
  <amqp_queue>psp.in.servicenow</amqp_queue>
  <amqp_password>****</amqp_password>

It should be replaced with this:

      <message_connection user="admin" password="****" queue="psp.in.servicenow">amqp://localhost</message_connection>

This following approach is deprecated.

  <amqp_uri>amqp://localhost</amqp_uri>
  <amqp_user>admin</amqp_user>
  <amqp_password>****</amqp_password>
  <amqp_queue>psp.in.servicenow</amqp_queue>
  <amqp_proxy>http://192.168.40.131</amqp_password>

It should be replaced with this:

      <message_connection user="admin" password="****" queue="psp.in.servicenow" proxy="http://192.168.40.131">amqp://localhost</message_connection>

If neither approach exists in config.xml it's equivalent to specifying this:

      <message_connection user="admin" password="****" queue="psp.in.servicenow">amqp://monitor.perspectium.com</message_connection>

Support for the following has been removed.

  <reporting_uri>amqp://localhost</reporting_uri>
  <reporting_user>admin</reporting_user>
  <reporting_password>****</reporting_password>
  <reporting_queue>psp.in.servicenow</reporting_queue>

Instead you can use:

      <reporting_connection user="admin" password="****" queue="psp.in.servicenow">amqp://monitor.perspectium.com</reporting_connection>
  OR
      <reporting_connection user="admin" password="****" queue="psp.in.servicenow" proxy="http://102.168.40.131:8080">amqp://monitor.perspectium.com</reporting_connection>

If neither is configured it will default to your <message_connection> configuration

Support for the following has been removed.

  <heartbeat_uri>amqp://localhost</heartbeat_uri>
  <heartbeat_user>admin</heartbeat_user>
  <heartbeat_password>****</heartbeat_password>
  <heartbeat_queue>psp.in.servicenow</heartbeat_queue>

Instead you use:

      <heartbeat_connection user="admin" password="****" queue="psp.in.servicenow">amqp://monitor.perspectium.com</heartbeat_connection>
  OR
      <heartbeat_connection user="admin" password="****" queue="psp.in.servicenow" proxy="https://192.168.40.131>amqp://monitor.perspectium.com</heartbeat_connection>

If NOT specified it will default to your <message_connection> configuration

Example:

  <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
  <config>
      <common>
          <message_connection user="admin" password="****">amqp://notMonitor.perspectium.com</message_connection>
      </common>
  </config>

conf/agent.xml

Configured within a given <task>

This approach is deprecated but still supported.

      <amqp_uri>amqp://localhost</amqp_uri>
      <amqp_user>admin</amqp_user>
      <amqp_password>****</amqp_password>
      <amqp_queue>psp.in.servicenow</amqp_queue>
      <amqp_proxy>http://192.168.40.131</amqp_password>

Instead use:

      <message_connection user="admin" password="****">amqp://localhost</message_connection> - default queue is sharer: psp.in.replicator.AGENT_NAME, subscriber: psp.out.replicator.AGENT_NAME
  OR
      <message_connection user="admin" password="****">http://server1.perspectium.com</message_connection> - use HTTP, default queue is sharer: psp.in.replicator.AGENT_NAME, subscriber: psp.out.replicator.AGENT_NAME
  OR
      <message_connection user="admin" password="****" queue="psp.out.replicator.special_queue">amqp://localhost</message_connection> - Override the default Queue
  OR
      <message_connection user="admin" password="****" queue="psp.out.replicator.special_queue" proxy="http://192.168.40.131">amqp://localhost</message_connection> Override the default queue and proxy it

This approach is deprecated but still supported.

     <instance_name>dev068.service-now.com</instance_name>
     <instance_user>admin</instance_user>
     <instance_password>****</instance_password>
     <instance_proxy>http://54.214.30.183</instance_proxy>

Instead use:

  <instance_connection user="configured_user" password="****">https://dev068.service-now.com</instance_connection>
  OR
  <instance_connection user="configured_user" password="****" proxy="http://192.168.40.131">https://dev068.service-now.com</instance_connection>

In v3.17.0, support has been added a “type” attribute in <instance_connection> to support different types of ServiceNow instances such as ServiceNow Express and as of v3.19.0 instances using the Perspectium lite app:

  <instance_connection user="configured_user" password="****" type="servicenowexpress">https://dev068.service-now.com</instance_connection>

Type is only required for Express instances and instances using the Perspectium lite app as it will default to Enterprise instances if it is not specified.

Example:

  <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
  <config>
  <agent>
        <subscribe>
          <task>
              <task_name>sql_command_subscriber</task_name>
              <handler>com.perspectium.replicator.sql.SQLSubscriber</handler>
              <decryption_key>The cow jumped over the moon</decryption_key>
              <message_connection user="admin" password="****" queue="psp.out.replicator.mke_mac">amqp://localhost</message_connection>
              <instance_connection user="configured_user" password="****" proxy="http://192.168.40.131">https://dev068.service-now.com</instance_connection>
              <database_type>mysql</database_type>
              <database_server>localhost</database_server>
              <database_port>3306</database_port>
              <database_user>root</database_user>
              <database_password></database_password>
              <database>psp_repl</database>
              <max_reads_per_connect>1</max_reads_per_connect>
              <polling_interval>70</polling_interval>
              <queue_timing/>
           </task>
      </subscribe>
  </agent>
  </config>
replicator_config.txt · Last modified: 2017/03/22 14:43 by torrens