Responses from AMPS

This section describes messages that AMPS returns to applications.

The AMPS Client libraries handle the details of parsing the returned message and delivering it to the application as needed. The application is only responsible for interpreting the parsed message and responding as necessary.

Content Messages

AMPS provides three types of message that contain message content:

  • publish messages return data from a topic as it is published, in order, whether the data is being published live, or is the result of a replay.

  • sow messages return data from a SOW query. These messages return the state of messages that are current as of the time for the query. By default, the messages are returned without regard to the order in which the messages were published. A query can specify the order of the returned messages based on the data within the message by including the OrderBy header on the SOW query.

  • oof messages indicate that a content message no longer matches a subscription. These messages are sent to a client in order.

Ack Messages

AMPS provides information to the application and AMPS client about the status of commands using acknowledgement, or ack, messages.

A command to AMPS must explicitly request acknowledgement to receive a response from AMPS. By default, the AMPS client libraries request acknowledgements as needed to detect failures: see the AMPS User Guide chapter on Command Acknowledgements and the Developer Guide for each client language for details.

In some cases, an application may want additional information about the state of a command, and may request an ack explicitly. For example, an application may want to know how many records would be returned by a particular query. In that case, a common technique is to request a stats (statistics) ack, while setting the number of data messages to be returned to 0 (using the top_n=0 option).

The ack messages section describes the contents of the ack messages returned by AMPS.

Query Result Set Delimiters

AMPS provides a pair of delimiters, group_begin and group_end, that indicate when a query result set begins and ends.

Last updated

Copyright 2013-2024 60East Technologies, Inc.