Do I need to list every field in a SOW topic configuration?
Not unless you need the SOW topic to keep every message published to the topic.
The Key fields in a SOW topic are used to set the primary key for the topic -- that is, the thing that identifies distinct messages. This means that you only need to list those fields, not every field that a message contains.
AMPS does not enforce or require any particular schema for the messages in a SOW topic. There is no requirement that the definition of a topic in the SOW list every field in the message -- and, most often, listing every field in the message would result in AMPS storing more data in the SOW than necessary, and would require your application to sort through more messages than necessary to find the most current data.
For example, if your messages contain a distinct identifier (such as an "order id" or "job id"), you would typically only need to list that identifier as a Key. Likewise, if you are tracking the status of a server, the machine name might be the Key. There's no need to list any other field as a Key. AMPS will process the full message, and you will be able to query on any field in the message.
Last updated