User Tools

Site Tools


subscriber_task_message_level_filter

Subscriber Task Level Message Filtering

In some situations, it is possible to require that a replicator agent only process messages containing specific topic, type, or key values. This is especially true when instances of ServiceNow is cloned but the targeted queues of dynamic and bulk shares have not changed, causing messages that target your replicator agent but with a different key value. To enable this level of filtering, add specific topic, type, or key directives directly in the subscriber task section of your agent configuration (agent.xml)

The following example will cause the subscriber task to only process messages that contain key “ven01225”

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<config>
    <agent>
	<share>
	</share>
     	<subscribe>
     	<task>
            <task_name>dloo_mac</task_name>
            <message_connection password="xxxx" user="admin">amqp://nvirginia-cluster-2-amqp.perspectium.net</message_connection>
            <instance_connection password="xxxx" user="admin">https://ven01225.service-now.com</instance_connection>
            <key>ven01225</key>
            <handler>com.perspectium.replicator.sql.SQLSubscriber</handler>
            <decryption_key>xxxx</decryption_key>
            <database_type>mysql</database_type>
            <database_server>localhost</database_server>
            <database_port>3306</database_port>
            <database_user>xxxx</database_user>
            <database>psp_repl</database>
            <error_directory>../errors</error_directory>
         </task>
      </subscribe>
    <max_reads_per_connect>4000</max_reads_per_connect>
      <polling_interval>30</polling_interval>
   </agent>
</config>
subscriber_task_message_level_filter.txt · Last modified: 2015/12/14 10:41 by dloo