heartbeat command
Sends a command to AMPS that starts or refreshes a heartbeat timer. When a heartbeat timer is active, AMPS publishes periodic heartbeat messages to AMPS and expects the client to respond with a heartbeat message. If the client does not provide a heartbeat within the time specified, AMPS logs an error and disconnects the connection.
The AMPS client libraries automatically manage creating and returning heartbeats. It is rarely, if ever, necessary for an application to manage heartbeats. See the Developer Guide for the client library you are using for details.
Header Fields
The following table contains the header fields available to a heartbeat command.
| Field | Description |
|---|---|
cmd | The command to be executed. Value: |
opts | Specifies whether this command starts the timer or refreshes the timer. Valid options are:
|
Returns
The heartbeat message does not typically request an acknowledgment, and therefore does not receive a response. The command can, however, request acknowledgments as listed below.
| Acknowledgment | Description |
|---|---|
none | Not supported at this time. |
completed | Not supported at this time. |
parsed | Not supported at this time. |
persisted | Not supported at this time. |
processed | AMPS has processed the heartbeat message. |
received | AMPS has received the heartbeat message. |
stats | Not supported at this time. |