Cookbook: Delta Publish

This section presents common recipes for publishing to a topic in AMPS using the Command or Message interfaces. This section provides information on how to configure the request to AMPS. You can adapt this information to your application and the specific interface you are using.

Command: delta_publish

Basic Delta Publish

In its simplest form, a delta publish needs only the topic to publish to and the data to publish. The AMPS client automatically constructs the necessary AMPS headers and formats the full delta_publish command.

In many cases, a publisher only needs to use the basic delta publish command.

Header
Comment

Topic (required)

Sets the topic to publish to. The topic specified must be a literal topic name. Regular expression characters in the topic name are not interpreted. Some topics in AMPS, such as views and conflated topics, cannot be published to directly. Instead, a publisher must publish to the underlying topics.

Data

The data to publish to the topic. The AMPS client does not interpret, escape, or validate this data: the data is provided to the server verbatim.

Delta Publish with CorrelationId

AMPS provides publishers with a header field that can be used to contain arbitrary data, the CorrelationId. A delta publish message can be used to update the CorrelationId as well as the data within the message.

Header
Comment

Topic (required)

Sets the topic to publish to. The topic specified must be a literal topic name. Regular expression characters in the topic name are not interpreted. Some topics in AMPS, such as views and conflated topics, cannot be published to directly. Instead, a publisher must publish to the underlying topics.

Data

The data to publish to the topic. The AMPS client does not interpret, escape, or validate this data: the data is provided to the server verbatim.

CorrelationId

The CorrelationId to provide on the message. AMPS provides the CorrelationId to subscribers. The CorrelationId has no significance for AMPS. The CorrelationId may only contain characters that are valid in base-64 encoding.

Delta Publish with Explicit SOW Key

When publishing to a SOW topic that is configured to require an explicit SOW Key, the publisher needs to set the SowKey header on the message.

Header
Comment

Topic (required)

Sets the topic to publish to. The topic specified must be a literal topic name. Regular expression characters in the topic name are not interpreted. Some topics in AMPS, such as views and conflated topics, cannot be published to directly. Instead, a publisher must publish to the underlying topics.

Data

The data to publish to the topic. The AMPS client does not interpret, escape, or validate this data: the data is provided to the server verbatim.

SowKey

The SOW Key to use for this message. This header is only supported for publishes to a topic that requires an explicit SOW Key.

Last updated

Copyright 2013-2024 60East Technologies, Inc.