What is the default message type for AMPS?
AMPS does not have a default message type. The AMPS server represents messages in one of two ways:
As parsed value sets. In this representation, AMPS treats the contents of messages as a set of key/value pairs, where the tag for a field is the key (or, for hierarchical documents, the full path to the field from the root of the document).
As serialized messages. When persisting messages or delivering messages to subscribers, AMPS uses a full serialized message, and simply stores or delivers the bytes of the message. There is no AMPS-specific format for the message contents. Messages are stored exactly as they would be delivered to subscribers. (This means that, in many cases, AMPS does not need to re-serialize a message to deliver it, avoiding the need to do that processing.)
In neither case is there a "default" format or message type for AMPS. The core AMPS engine uses the same internal representation and interface regardless of the original format of the message.
The AMPS documentation and samples frequently use JSON or XML, since those message types do not require unprintable characters, are relatively easy to read, and are familiar to many developers and administrators.
Last updated