Client Status Events
The AMPS engine will publish client status events to the internal /AMPS/ClientStatus
topic whenever a client connects, issues a logon
command, disconnects, enters or removes a subscription, queries a SOW or issues a sow_delete
. AMPS sends a message if a client fails authentication. In addition, upon a disconnect, a client status message will be published for each subscription that the client had registered at the time of the disconnect. This mechanism allows any client to monitor what other clients are doing and is especially useful for publishers to determine when clients subscribe to a topic of interest.
To help identify clients, it is recommended that clients send a logon
command to the AMPS engine and specify a meaningful client name. This client name is used to identify the client within client status event messages, logging output and information on clients within the monitoring console. The client name must be unique if a transaction log is configured for the AMPS instance.
Each message published to the client status topic will contain an event
and a client_name
. Depending on the event type, the message will contain other relevant fields.
For example, the following JSON document demonstrates the message for a SOW query:
The table below defines the header fields which may be returned as part of the subscription messages to the /AMPS/ClientStatus
topic.
Since the client status messages must be able to be serialized based on data in AMPS, the /AMPS/ClientStatus
topic is not available for message types that rely on a fixed schema, such as protobuf
or struct
, and is not available for messages that have no fixed serialization such as binary
or composite message types.
Last updated