Auto-publishing module configuration

Transformer has an autopublishing module that allows it to automatically broadcast updated data to connected DataSource peers, even though it is an active DataSource application. The add-autopub configuration item enables you to specify the subjects that you want Transformer to automatically broadcast.

Here’s a list of all the auto-publishing configuration items; to get more detail, just click on the item you’re interested in.

Configuration file

Transformer’s auto-publishing configuration must be kept in a separate configuration file called autopub.conf.

If you’re using the Deployment Framework, put changes and additions to this configuration in the file <Framework-root>/global_config/overrides/servers/Transformer/etc/autopub.conf, where <Framework-root> is the Deployment Framework’s topmost directory.

add-autopub

add-autopub specifies one or more subject names (symbols) for which updates can be automatically published (broadcast) to connected DataSource peers, and the conditions under which they’ll be published. You can specify multiple add-autopub items for different sets of subjects.

Syntax:

add-autopub
   id                     [string]
   add-symbol             [array of strings]
   add-regex              [array of strings}
   disable-by-default     [boolean]
   distribute-on-peer-up  [boolean]
   listener-flags         [integer]
   peer-label             [array of strings]
   send-only-if-primary   [boolean]
   send-only-once         [boolean]
end-autopub
Option Type Default Description

add-regex

array of strings

[none]

One or more space separated regular expressions that determine subjects for which updates are automatically broadcast.

For example, add-regex ^/FX/EUR* ^/FX/GBP* selects updates for all subject names of the form /FX/EUR<something> and /I/GBP<something>

The autopublishing module broadcasts updates for all the subjects specified by add-regex and add-symbol.

add-symbol

array of strings

[none]

One or more space separated subject names for which updates are automatically broadcast.

For example: add-symbol /FX/AUDUSD /FX/USDCAD

The autopublishing module broadcasts updates for all the subjects specified by add-regex and add-symbol.

disable-by-default

boolean

FALSE

This option only applies to LUA-based pipelines.

When this option is TRUE, updates for the subjects defined by this add-autopub item (see add-symbol and add-regex) aren’t published (broadcast) until they are explicitly enabled by a Lua pipeline. You re-enable publishing through an API call in the pipeline: autopub_enable_symbol() enables publishing for a specific subject and autopub_enable_group() enables publishing for all eligible subjects in an add-autopub item that’s specified by id.

The default value of FALSE means that all subjects defined by this add-autopub item are automatically published until publishing is explicitly disabled by an API function call in a Lua pipeline (call to autopub_disable_symbol() or autopub_disable_group()).

For details of the above API functions, see the Autopub Module: Pipeline Functions page in the Transformer Pipeline Module API documentation.

distribute-on-peer-up

boolean

FALSE

When this option is TRUE, if one of the DataSource peers listed in peer-label goes down, when the peer comes up again, every object in Transformer’s cache that matches a subject specified by add-symbol or add-regex is sent to the peer.

When the option is FALSE, only new matching updates are sent to the peer when it comes up again.

id

string

[automatically generated -

see description]

A unique identifier for this add-autopub item. This is recorded against entries in Transformer’s log file (var/transformer.log).

The default if you don’t explicitly define an id is autopub-<index>, where <index> is the index position of this add-autopub entry in the Transformer configuration, starting at 0.

listener-flags

integer

0 (no flags)

Flags that control how the autopublishing module listens for updates that are to be broadcast.

Values are:

  • none or 0: When Transformer loads the autopublishing module, it subscribes to all the subjects defined by the add-symbol option of this add-autopub item, so the module will subsequently receive the updates for all of these subjects and can broadcast them to the DataSource peers specified in peer-label.

  • accessory or 1: When Transformer loads the autopublishing module, it doesn’t subscribe to any of the subjects defined by the add-symbol option of this add-autopub item. Subsequently, the module just listens for updates and broadcasts any it receives that are for subjects matching the lists in add-symbol.

listener-flags has no effect on subjects that are defined by the add-regex option.

peer-label

array of strings

(none)

A space-separated list of Datasource peers. Updates for subjects defined by this add-autopub item (see add-symbol and add-regex) are broadcast to these peers. Each entry in the list must be the value of the remote-label option in an add-peer item that specifies Transformer’s connection to a DataSource peer.

send-only-if-primary

boolean

FALSE

When TRUE, updates for subjects defined by this add-autopub item (see add-symbol and add-regex) are only broadcast if this Transformer is the primary, or only, Transformer in the cluster.

send-only-once

boolean

FALSE

When this option is FALSE, (the default setting), updates for subjects defined by this add-autopub item (see add-symbol and add-regex) are broadcast to all the DataSource peers listed in peer-label.

When the option is TRUE, updates are only sent to the first available (up) DataSource peer in the peer-label list.

This could be useful in a failover situation. For example, assume peer-label is specified as:

peer-label primary-peer secondary peer

where secondary-peer is the failover peer.

Then when send-only-once is TRUE, secondary-peer only gets updates when primary-peer has gone down. When primary-peer comes back up, updates are sent to primary-peer again and not to secondary-peer.

hashtable-size

hashtable-size specifies the size elements of the hash table that keeps track of the publish state.

Syntax: hashtable-size <size-in-table-elements>

Type: integer

Default value: 10000 hash table elements