Configuration
To create a SOW topic, you configure the topic in the SOW section of the AMPS configuration file.
At a minimum, SOW topics require a Name
, and the MessageType
of the messages to store in the SOW. If the SOW will be persistent, a FileName
is required. Most often, SOW topics use AMPS to generate the SOW Key, and one or more Key
definition elements are required to specify the fields that AMPS will use for the SOW Key.
For example, the following configuration file fragment specifies a SOW topic named test-sow
. The topic stores JSON-format messages, and uses the /id
field of incoming messages to that topic to uniquely identify messages. Records in this topic will be both maintained in memory and persisted to a file in the ./sow/
directory, so the contents of the topic will be retained across restarts of the AMPS instance. Notice that the file name specification uses the special format character %n
as a placeholder for the topic name and message type.
The AMPS User Guide and AMPS Configuration Guide contain full details on configuring a SOW topic.
The practical examples later in this section use the configuration above.
Last updated