Acknowledgement type for the given command.
A client-originated identifier used to mark a location in journaled messages.
Specifies the number of messages that are batched together when returning a query result.
Command to be executed. Can be one of:
Client-specified command id. The command id is returned by the engine in responses to commands to allow the client to correlate the response to the command.
Used to identify a client. Useful for publishers that wish to identify the source of a publish, client status
messages and for client heartbeats. Can be set with logon
command.
Message data. Contains message payload parsed according with its message type and the TypeHelper used for that type.
SOW expiration time (in seconds) if used in publish.
Content filter expression.
Group Sequence Number returned with each batch message of a SOW response.
Message header fields, such as command()
, subId()
, filter()
, etc.
A SowKey will accompany each message returned in an SOW batch. A SowKey may also be added to messages coming in
on a subscription when the published message matches a record in the SOW. A publish
command may contain a SOW
key if the SOW for the topic is configured to accept user-provided SOW keys.
Format:
OR
Sent with XML formatted message data to indicate the number of bytes used by the message body.
For messages from a queue, the time at which the lease expires.
Returned in the acknowledgement to a SOW query that indicates number of matches.
A comma-delimited list of options on a specific command. Also has an alias: `opts`.
The SOW topic key by which to order SOW query.
SOW Query identifier set by client to identify a query.
The failure message that appears when an acknowledgement returns a status of failure.
Used in conjunction with the stats acknowledgement, this is the number of records deleted from the SOW with a
sow_delete
command.
Used in conjunction with the stats acknowledgement, this is the number of records inserted into the SOW.
Returned in the acknowledgement to an SOW query that indicates number of records in the store.
Used in conjunction with the stats acknowledgement, this is the number of records updated in the SOW.
An integer that corresponds to the publish message sequence number. For more information see the Replication section in the User Guide. It is actually a big integer, but since it's received in the JSON header and is parsed before we can wrap it in the BigInteger object, it's treated as a string to prevent rounding issues with JavaScript.
Comma-separated list of SubIds sent from AMPS engine to identify which client subscriptions match a given
publish
message.
Comma-separated list of SowKey values.
Used to indicate client status when client is monitored for heartbeats. Can be one of:
The subscription identifier set by server when processing a subscription.
The Topic value.
The number of records to return. Note: If TopN is not equally divisible by the batch size, then more records will be returned so that the total number of records is equally divisible by the batch size setting.
Returned in the acknowledgement to an SOW query that indicates number of topic matches.
Message timestamp set by the server in a ISO-8601 date-time format.
Used to identify the user id of a command.
contains the version of the AMPS server.
Opaque token set by an application and returned with the message. Must be base64
encoded characters only.
This is the AMPS Message representation class. Any Message received from AMPS is a Message object.
Message have two main fields:
header
anddata
. Theheader
property is used to access message header fields, such as command type, message length, sow key, etc. Thedata
fields contains the message payload.const messageHandler = message => { // print out the command type console.log(message.header.command()); // get the subscription id of the message console.log(message.header.subId()); // print out message data console.log(message.data); };
MessageHeader for the list of available header methods.