How does AMPS construct the SowKey for a message?
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 /a
and /b
defined, then an individual message's SowKey is defined as
DOMAIN 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. VALUE the value the message contains at that path special a special delimiter CRC Checksum computed over the constructed string
Notice that:
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).
Last updated