AMPS constructs the SowKey for the message from the contents of the defined Key fields for the topic and the KeyDomain for the topic (which is the name of the SOW topic by default).
Here's an example of how it works. If a Topic "foo" has Key fields
/b defined, then an individual message's SowKey is defined as
CRC(DOMAIN("foo") + special + VALUE("/a") + special + VALUE("/b"))
|returns the SowKey "domain" for the topic. By default, this is the topic's name. If the configuration for the topic specifies a KeyDomain, then this function returns the KeyDomain.
|the value the message contains at that path
|a special delimiter
|Checksum computed over the constructed string
- If there's no entry for the topic in the configuration file (that is, there's no SOW configured), AMPS doesn't produce a SowKey for the message.
- When KeyDomain isn't explicitly set, identical messages to different topics produce different SowKeys.
- When KeyDomain is set, you can use the SowKey to correlate messages published to different topics (provided the topics use the same key fields).