heartbeat
Last updated
Last updated
Copyright 2013-2024 60East Technologies, Inc.
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.
The following table contains the header fields available to a heartbeat
command.
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.
Field
Description
Command
The command to be executed.
Value: heartbeat
Options
Specifies whether this command starts the timer or refreshes the timer.
Valid options are:
start
, immediately followed by an interval - This option specifies that the command starts a timer, and sets the interval at which AMPS will expect heartbeat messages.
For example, to specify an interval of 5 seconds, the option is start,5
beat
- This option specifies that the command refreshes the heartbeat
timer.
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.