Persisting Event Topics
By default, AMPS event topics are not persisted to the SOW. However, because AMPS event topic messages are treated the same as all other messages, the event topics can be persisted to the SOW. Providing a topic definition with the appropriate Key
definition can resolve that issue by instructing AMPS to persist the messages.
The Key
definition you specify must match the field name used for the message type specified in the SOW topic. That is, to track distinct records by client name for a SOW that uses json
, you would use the following key:
While to track distinct records by client name for a SOW that uses fix
, you would use the following key:
For example, to persist the last /AMPS/SOWStats
message for each topic in fix
, json
and xml
format, the following Topic
sections could be added to the SOW
section of the AMPS configuration file:
Every time an update occurs, AMPS will persist the /AMPS/SOWStats
message and it will be stored three times, once to the fix
SOW topic, once to the json
SOW topic, and once to the xml
SOW topic. Each update to the respective SOW topic will overwrite the record with the same 20066
, topic
or Topic
tag value. Doing this allows clients to now query the SOWStats
topic instead of actively listening to live updates.
Last updated