Save your agent.xmlSave the changes you've made to your agent.xml and close the file. An example agent.xml configuration for saving all records to a single file is shown below: Code Block |
---|
| <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<config>
<agent>
<max_reads_per_connect>10</max_reads_per_connect>
<polling_interval>20</polling_interval>
<subscribe>
<task>
<task_name>file_subscribe</task_name>
<message_connection password="password" user="user">https://<customer>.perspectium.net</message_connection>
<instance_connection password="password" user="user">https://<instance>.service-now.com</instance_connection>
<decryption_key>The cow jumped over the moon</decryption_key>
<handler>com.perspectium.replicator.file.XMLFileSubscriber</handler>
<file_name>records.xml</file_name>
<files_directory>/Users/user/Downloads</files_directory>
<exclude_xml_header/>
<buffered_writes>250</buffered_writes>
</task>
</subscribe>
</agent>
</config> |
An example agent.xml configuration for saving one record per file is shown below: Code Block |
---|
| <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<config>
<agent>
<max_reads_per_connect>10</max_reads_per_connect>
<polling_interval>20</polling_interval>
<subscribe>
<task>
<task_name>file_subscribe</task_name>
<message_connection password="password" user="user">https://<customer>.perspectium.net</message_connection>
<instance_connection password="password" user="user">https://<instance>.service-now.com</instance_connection>
<decryption_key>The cow jumped over the moon</decryption_key>
<handler>com.perspectium.replicator.file.XMLFileSubscriber</handler>
<one_record_per_file/>
<files_directory>/tmp</files_directory>
<file_prefix>records</file_prefix>
<file_suffix>.xml</file_suffix>
</task>
</subscribe>
</agent>
</config> |
An example agent.xml configuration for saving records to multiple files is shown below: Code Block |
---|
| <?xml version="1.0" encoding="ISO-8859-1" ?>
<config>
<agent>
<!-- the following subscribe fragment defines subscribing class -->
<!-- and its arguments -->
<subscribe>
<task>
<task_name>test_file_subscriber</task_name>
<message_connection password="password_here" user="admin" queue="psp.in.meshlet.example">https://<customer>.perspectium.net</message_connection>
<instance_connection password="Adminadmin1" user="admin">https://<instance>.service-now.com</instance_connection>
<max_reads_per_connect>1</max_reads_per_connect>
<polling_interval>3</polling_interval>
<decryption_key>Example_decryption_key_here</decryption_key>
<handler>com.perspectium.replicator.file.JSONFileSubscriber</handler>
<buffered_writes>10</buffered_writes>
<files_directory>/Users/You/Downloads/Example</files_directory>
<file_prefix>$table_$d{yyyyMMdd}_$i</file_prefix>
<file_suffix>.json</file_suffix>
<translate_newline>%13</translate_newline>
<separate_files>table</separate_files>
<enable_audit_log/>
</task>
</subscribe>
</agent>
</config> |
|