Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


HTML
<style>
.release-box {
	height: 30px; 
	width: 100px; 
	padding-top: 8px;
	text-align: center; 
	border-radius: 5px; 
	font-weight: bold; 
	background-color: #0ACA8B; 
	border-color: #FCE28A;
}

.release-box:hover {
  	cursor: hand;
    cursor: pointer;
    opacity: .9; 
}
</style>
<meta name="robots" content="noindex">

<div class="release-box">
<a href="https://docs.perspectium.com/display/fluorineplus" style="text-decoration: none; color: #FFFFFF; display: block;">
Fluorine+
</a>
</div>



The DataSync for ServiceNow Agent supports Perspectium DataSync Agents support an “exclusive consumer” mode that provides a Highly Available (HA) Agent solution while maintaining the order of messages in a queue. This active-passive HA Highly Available approach will exclusively allow only one DataSync Agent to actively read messages from a queue. Other DataSync Agents will that passively try to connect to the queue and will only be given access to the queue if another DataSync Agent is no longer connected.

The Agent uses DataSync Agents use the queue in the message connection and locks that queue for exclusive use. If multiple tasks are made using the same message connection, only one subscriber task will be created and used. When running a backup another DataSync Agent, a warning will be logged in the perspectium.log file indicating that the queue is in exclusive use and that consumer wait time will be increased (default is to increase to 30 seconds). Once the first running DataSync Agent is stopped or fails, the backup DataSync Agent will start consuming messages when the queue becomes available and the consumer wait time will be reset.

(info) NOTE: The Highly Available Agent is only available when your DataSync for ServiceNow Agent is set to connect to the Perspectium Mesh via the AMQP/AMQPS protocol (HTTP/HTTPS are is not supported).


Prerequisites


(warning) First, you will need to install the DataSync for ServiceNow Agentset up one of the Perspectium DataSync Agents.

(warning) You should also stop running your DataSync Agent before making any Agent configuration changes.

Procedure

To configure your DataSync for ServiceNow Agent to run as a Highly Available Agent, follow these steps:


UI Steps


UI Step

Access your agent.xml configuration file

Navigate

Change your current directory to Perspectium_Replicator_Agent 

Open a terminal window and change your current directory to the directory where you installed saved your agent.xml file when installing your DataSync for ServiceNow Agent files. Then, change your current directory to Perspectium_Replicator_Agent

UI Step

Agent.


UI Step

Add the exclusive attribute to <message_connection>

Open your agent.xml file in a text editing application and locate the <message_connection> tag, which should be nested within <task>. To the <message_connection> tag, add an attribute named exclusive and set its value to true.


UI Step

Add a <consumer_sleep_time> tag (optional)

Within the <task> tag, you can optionally nest a tag named <consumer_sleep_time> whose value will indicate the number of milliseconds that a passively connecting DataSync Agent should wait before attempting to connect again following a failed connection.


UI Step

Save your agent.xml

Save the changes you've made to your agent.xml and close the file. An example agent.xml configuration for a Highly Available DataSync Agent is shown below

Execute the Agent start command

Execute the following command to start running your DataSync for ServiceNow Agent:

bin/startDaemon.sh start
Code Block
languagebashxml
themeEclipse
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
    <config>
     <agent>

        <max_reads_per_connect>2000</max_reads_per_connect>
       	<polling_interval>15</polling_interval>

        <subscribe>
            <task>
                <task_name>ticket_table_replication</task_name>
                <polling_interval>30</polling_interval>

                <handler>com.perspectium.replicator.sql.SQLSubscriber</handler>
                <decryption_key>The cow jumped over the moon</decryption_key>

                <message_connection queue="psp.out.replicator.example" password="encrypted:iTOCp4deP7rJNgFkf2AEMA==" user="exampleuser"  use_basic_consume="true" exclusive="true" >amqp://acme.perspectium.net</message_connection>
                <instance_connection user="example.user" password="examplepassword">https://myinstance.service-now.com</instance_connection>
                <consumer_sleep_time>50000</consumer_sleep_time>
                <database_type>mysql</database_type>
                <database_server>localhost</database_server>
                <database_port>3306</database_port>
                <database_user>root</database_user>
                <database_password>encrypt:mypassword</database_password>
                <database_parms/>
                <database>mydatabase</database>
                <skip_database_creation/>
            </task>
      </subscribe>

   </agent>
  </config>



UI Step

Run your Highly Available DataSync Agent

After configuring your agent.xml file to support your Highly Available DataSync Agent, start running your DataSync Agent again.





Similar topics


Content by Label
showLabelsfalse
max5
showSpacefalse
sortmodified
cqllabel = "data-sync" and space = currentSpace()

Contact Perspectium Support


US: 1 888 620 8880

UK: 44 208 068 5953

support@perspectium.com