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
CRC(DOMAIN("foo") + special + VALUE("/a") + special + VALUE("/b"))
DOMAIN
returns theSowKey
"domain" for the topic. By default, this is the topic's name. If the configuration for the topic specifies aKeyDomain
, then this function returns theKeyDomain
.VALUE
is the value the message contains at that path special a special delimiter CRC Checksum computed over the constructed string
info
- 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 differentSowKey
s. - When
KeyDomain
is set, you can use theSowKey
to correlate messages published to different topics (provided the topics use the same key fields).