You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »


The file that controls the configuration settings for Perspectium DataSync Agents is the agent.xml file. This file is automatically created within the Agent's bin directory upon installation. To make changes to the configuration settings for your DataSync Agent, open this agent.xml file in a text editing application and modify the directives described in the sections below.

(info) NOTE: The directives described below are only the essential configurations that must be set for your DataSync Agent. For additional DataSync Agent configuration settings, see the Similar topics list below or browse the topics under DataSync.


Share & subscribe

DataSync Agents can perform two main functions, share and subscribe. To enable these functions, nest one or many of the following directives within the agent.xml's <agent> directive:

DirectiveDescription
<share>An Agent configured with <share> functionality (also known as a producer) monitors static data sources and places messages from those sources into queues in the Perspectium Mesh.
<subscribe>

An Agent configured with <subscribe> functionality (also known as a consumer) monitors queues in the Perspectium Mesh and processes any messages in those queues, typically by routing those messages to a static data source.

(info) NOTE: This is the more common use case for the DataSync Agent.


Message batching directives (optional)

To improve the performance for your DataSync Agent, you can optionally add some batching directives that specify what constitutes a batch of messages that will trigger message processing.

DirectiveDescription
<max_reads_per_connect>

Maximum number of messages to consumer per connection interval

<max_writes_per_connect>

Maximum number of messages to produce per connection interval

<polling_interval>

Batch size (in number of messages) to trigger the processing of messages in a queue

<skip_message_set_processing/>

Self-closing tag that disables Message Set posting for data shared from ServiceNow


Task & handler

The <task> directive defines a specific <share> or <subscribe> function that your DataSync Agent should perform. Multiple <task> directives can be nested within the <share> and <subscribe> directives, and individual configurations can be defined for each <task> by nesting further configuration directives (described in the following sections) within each <task>.

DirectiveDescription
<task>

Task that handles either sharing or subscribing. You can configure separate settings by defining directives within each <task> directive. You can also specify an instances attribute here and give it a value of 4 (default) so that 4 instances of your <share> or <subscribe> task can run concurrently, thus improving throughput for data processing.

(info) NOTE: You do not need to enter a value within the <task> directive. Nest all configuration directives noted below within your each of your <task> directives.

<task_name>

Name for your <task>

(info) NOTE: Only alphanumeric characters, numbers, and underscores are permitted as values for <task_name>.

<handler>Name of the Java handler class. In most cases, the value for this directive will be com.perspectium.replicator.sql.SQLSubscriber.


Task Configurations

Under the <task>directive are configurations related to the task your DataSync Agent is performing such as saving data to a database.  These different configurations are as follows: 


Message, instance, and schema connection

The <message_connection> and <instance_connection> directives define how your DataSync Agent connects to the Perspectium Mesh and ServiceNow instance, respectively. For your DataSync Agent to connect to your Salesforce organization, you will need to include the <message_connection> and <schema_connection> directives.

DirectiveRequired attributesDescription
<message_connection>

user = Perspectium Mesh username

Perspectium Mesh URL

e.g., https://mymesh.perspectium.net

password = Perspectium Mesh password

(info) NOTEYou can optionally base64 encode this password, and include the base64 encoded string after encrypted: for this attribute's value.

queue = Perspectium Mesh queue name

use_basic_consume = true

(info) NOTE: It is strongly recommended to set this attribute's value to true set when connecting via HTTPS to maximize throughput and prevent possible loss of messages.

<instance_connection>

user = ServiceNow instance username

(info) This ServiceNow username must have the perspectium role assigned in order to access ServiceNow table schemas.

ServiceNow instance URL

e.g., https://myinstance.service-now.com

password = ServiceNow instance password

(info) NOTEYou can optionally encrypt this password by entering encrypt: followed by the password for this attribute's value. For example, "encrypt:password1". This will encrypt the password the first time the Agent is run and change the attribute's value to "encrypted:<encrypted_password>" to indicate as such.

<schema_connection>


user = Salesforce org username

Salesforce org URL

e.g., https://login.salesforce.com/services/oauth2/token



password = Salesforce org password

(info) NOTEYou can optionally encrypt this password by entering encrypt: followed by the password for this attribute's value. For example, "encrypt:password1". This will encrypt the password the first time the Agent is run and change the attribute's value to "encrypted:<encrypted_password>" to indicate as such.

client_id = Salesforce Consumer Key for the Perspectium Replicator app
client_secret = Salesforce Consumer Secret for the Perspectium Replicator app


Encryption key & decryption key

The <encryption_key> directive is used with <share> tasks to encrypt data that is being shared from a static data source to an application. The <decryption_key> directive is used with <subscribe> tasks to decrypt data that was encrypted by a sharing application. The value for the <encryption_key> directive should match the subscribing application's decryption key, and the value for the <decryption_key> direction should match the sharing application's encryption key.

DirectiveDescription
<encryption_key>

Encryption key used to encrypt data being shared from a static data source to an application

<decryption_key>

Decryption key used to decrypt data being shared from an application


Database

There are several directives related to your static data source, or database, that the DataSync Agent connects to. For more information on how to configure your database information in the agent.xml configuration file, see Perspectium SQL Replicator Agent Configuration Guide.

DirectiveDescription
<database_type>

Type of database you are syncing your data to. Supported databases and associated values for the <database_type>:

Supported databaseValue to enter for <database_type>
Oracleoracle
MS SQL Serversqlserver
MySQLmysql
Snowflakesnowflake
SAP Hanahana
Amazon Redshiftredshift
IBM DB2db2
HP Verticavertica
PostgreSQLpostgres
<database_server>

URL for your database. If your database is installed on your local machine, set this value to localhost.

<database_port>Port number for your database
<database_user>Username used to connect to your database
<database_password>Password used to connect to your database
<database_parms>

(Optional) Can be used to pass additional parameters to the database server during establishment of the connection

e.g., characterEncoding=UTF-8 &amp; useSSL=false

(info) It is recommended that spaces are added between each parameter. Failing to do this may cause the agent to not start properly.

<database>Name of your database
<database_max_column_size>Maximum size of an object that can appear in your database's columns
<database_sid>

SID used for your Oracle database

tinymce.emotions_dlg.information NOTE: This directive is required for DataSync integrations to an Oracle database only.

<byte_padding>

(Optional) Can be used for multi-byte characters by multiplying the size of the columns. Adding an integer to this directive will create columns times larger.

tinymce.emotions_dlg.information NOTE: This directive defaults to 3.

tinymce.emotions_dlg.information NOTE: Make sure your database is using the correct character set.

<column_sort>

Sorts your database's columns in a specified order.

(info) NOTE: Currently, this directive only supports alphabetical order.  Value should be set to alpha


Data Guarantee

These directives configure how the DataSync agent works with Data Guarantee.

DirectiveDescription
<receipt_send_interval>

(Optional) Indicates the number of seconds in which the Agent will regularly send receipts back to the sharing/publishing instance.

tinymce.emotions_dlg.information NOTE: This directive defaults to 1800.



Example basic agent.xml configuration

The example below shows some of the basic configurations that must be set for a Perspectium DataSync Agent. For additional DataSync Agent configuration settings, see the Similar topics list below or browse the topics under DataSync.

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<config>
   <agent>
      <max_reads_per_connect>4000</max_reads_per_connect>
      <polling_interval>5</polling_interval>
      <skip_message_set_processing/>
      <share/>
      <subscribe>
         <task instances="4">
            <task_name>datasyncforservicenow_to_mysql_subscribe</task_name>
            <message_connection password="encrypted:vlOtU71yu8N/EFIJH85SSBtaIt7qEEfvqiqft9VZyYE=" queue="psp.out.replicator.testqueue" user="admin" use_basic_consume="true">https://testperspectium.net</message_connection>
            <instance_connection password="encrypted:vlOtU71yu8N/EFIJH85SSPN9aF0P5/YViVwPEVFcGW4=" user="test.user">https://myinstance.service-now.com</instance_connection>
            <handler>com.perspectium.replicator.sql.SQLSubscriber</handler>
            <decryption_key>The cow jumped over the moon</decryption_key>
            <database_type>mysql</database_type>
            <database_server>localhost</database_server>
            <database_port>3306</database_port>
            <database_user>root</database_user>
            <database_password>encrypted:vlOtU71yu8N/EFIJH85SSMoilKLTeJHQrNZPJ7c5tFU=</database_password>
            <database_parms>characterEncoding=UTF-8 & useSSL=false</database_parms>
            <database_max_column_size>251</database_max_column_size>
            <database>psp_repl</database>
			<byte_padding>4</byte_padding>
			<column_sort>alpha</column_sort> 
         </task>
      </subscribe>
   </agent>
</config>