Publish Message

The amps-action-do-publish-message module publishes a message into a specified topic.

Publishes from this action are treated as publishes from an AMPS client inside the AMPS engine. This means that:

  • There are no user credentials associated with the publish, so entitlements are not applied.

  • There is no special handling for the publish. The publish is recorded in the transaction log exactly as if it arrived from outside of the instance and is processed within the instance as if the publish had arrived from an external publisher.

To publish a message, this module requires a Topic, the MessageType to publish on and also the Data that the message will contain. In addition to that, this module also accepts optional parameters listed below:

Parameter
Description

Topic (required)

The topic of the message being published.

MessageType (required)

The message type for the topic.

There is no default for this parameter.

Data (required)

The data that the message will contain.

Delta

Whether to use a delta publish.

When this option is present, and the value is true, the action will use a delta publish.

UpdateOnly

Specifies whether a delta publish is allowed to insert a record, or only update a record.

When a delta publish is specified (that is, Delta is true ), and this option is set to true, AMPS will only accept the publish if there is a record present to be updated.

When no value is specified, this option is false.

This module does not add any variables to the AMPS context.

Last updated