Does AMPS return messages from the SOW in the order published?

AMPS doesn't guarantee any particular order for SOW messages. If you need to determine the order in which a client published messages, we recommend adding a field containing a timestamp to the message.

As of AMPS 4.0, AMPS supports an OrderBy parameter for SOW queries, which allows you to specify the order in which AMPS returns results. The order is based on the contents of the message. For example, if the messages have a timeEntered field that records the time at which the publisher created the message, you could return messages in the order in which they were entered by using /timeEntered ASC as the OrderBy parameter for the query.

Last updated