publish

The publish command is the primary way to insert messages into the AMPS processing stream. A publish command received by AMPS will be forwarded to other connected clients with matching subscriptions.

Depending on the server configuration, a publish command may also be used to update the State of the World, written to the transaction log, replicated to other instances, and so on.

In AMPS, the publisher is only responsible for delivering the message to AMPS reliably. The AMPS server configuration manages routing the message to subscribers, determining if the message should be persisted, updating any state that the message affects, and so on.

Header Fields

The following table contains the header fields available to a publish command.

Returns

A client which issues a publish can request a processed acknowledgment message; however this is not recommended as there is a significant performance overhead associated with this. The following table contains the AckType messages which can be returned by a publish.

In general, 60East recommends only requesting persisted acknowledgments for publish commands, since these acknowledgments can be conflated when commands succeed.

Errors

Any errors that occur while processing this command will be returned in the status of a processed acknowledgment message and logged to the log file. Regardless of success or failure, the processed acknowledgment message will be returned only if requested by specifying processed in the AckType field.

Errors that occur during the processing command or after processing the command will be returned in the status of a persisted acknowledgment message if one is requested. This acknowledgment is returned at the point that the message can be considered safely persisted in AMPS.

The configuration of the AMPS instance controls when persisted acknowledgments are returned, and persisted acknowledgments can be conflated to apply to multiple publish commands. See the AMPS User Guide for details.

Last updated

Copyright 2013-2024 60East Technologies, Inc.