flush

Sends a command to AMPS that returns an acknowledgment when all previous commands from this client have been processed. This command helps applications that use AMPS determine when AMPS has received all of the messages that have been sent, making it safe for the client to exit.

Notice that the publishFlush command available in the AMPS client libraries includes additional logic (when a PublishStore is present) to ensure that messages published to AMPS have been safely persisted.

Header Fields

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

Field

Description

Command

The command to be executed.

Value: flush

ClientName

A string identifier used to give a client a unique ID.

AckType

Acknowledgment type for the given command.

Value is a comma separated list of one or more of the following: none, completed or processed.

Returns

A flush message specifying an AckType of completed or processed will receive an ack message when all previous messages from this client have been processed by AMPS.

The following table contains the acknowledgment messages that can be returned by a flush command.

Acknowledgment

Description

none

No ack message is returned.

This is the default behavior.

completed

All previous commands have been processed by AMPS.

persisted

All previous commands from this publisher have been persisted by AMPS (or have failed and produced the requested acknowledgments).

processed

AMPS has processed the flush message.

received

The flush command has been received.

stats

Not supported at this time.

Last updated

Copyright 2013-2024 60East Technologies, Inc.