Skip to content
axxbetadocs
GitHub

SNS

View .mdOpen in Claude

Publish messages to SNS topics and check the messages your services publish.

The steps use the scenario’s AWS account (the {word} aws account with the following properties:, from aws-core).

Checking a topic does not take messages from anyone: for the topics a run checks, Axx subscribes a queue of its own (axx-<run>-<topic>, with raw message delivery) once the apps are up, and removes the subscription and the queue when the run ends. A check only looks at the messages received since its scenario started; match on data unique to the scenario, since scenarios run in parallel.

When a message is published to the {word} sns topic:
"""
...
"""

Send a message whose body is the doc string to a sns topic.

Parameters: {word} (one word, no spaces)

Example:

When a message is published to the claim-decisions sns topic:

Since 0.1.0.

When the {filepath} message is published to the {word} sns topic[[ with the following attributes:]]

Send a message whose body is the file (resolved against resources) to a sns topic, with the attributes of the table (name | value).

Variants (optional parts in [[...]] above):

  • the {filepath} message is published to the {word} sns topic
  • the {filepath} message is published to the {word} sns topic with the following attributes:

Parameters: {filepath} (A file of the project, without whitespace: a path relative to the resources directories or to the directory of axx.yaml, or an absolute path. Editors link it to the file), {word} (one word, no spaces)

Example:

When the messages/shipment-delivered.json message is published to the claim-decisions sns topic
When the messages/shipment-delivered.json message is published to the claim-decisions sns topic with the following attributes:

Since 0.1.0.

Then [[within {duration} ]]the {word} sns topic has a message where:
| ... | ... |

Wait (10s, or the given time) until the sns topic has a message, received since the scenario started, that meets every row: path | value on the JSON body (a field name, a dotted path or a JSONPath, compared as text; null for null and undefined for absent), or attribute <name> | value on a attribute sent with it. Axx subscribes a queue of its own to the topic for the run.

Variants (optional parts in [[...]] above):

  • the {word} sns topic has a message where:
  • within {duration} the {word} sns topic has a message where:

Parameters: {duration} (A duration in seconds or minutes, e.g. 5s or 2m), {word} (one word, no spaces)

Example:

Then within 30s the claim-decisions sns topic has a message where:

Since 0.1.0.