Skip to content

Commit

Permalink
Merge branch 'master' into amqp-consume-limit
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrisonnet authored Oct 15, 2019
2 parents 80b8f91 + 13cb29d commit c966b49
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docs/gateways/aws-sqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,18 @@ The gateway consumes messages from AWS SQS queue.

2. Create the [event Source](https://github.com/argoproj/argo-events/tree/master/examples/event-sources/aws-sqs.yaml). Because SQS works on polling, you need to provide a `waitTimeSeconds`.


3. Deploy the [sensor](https://github.com/argoproj/argo-events/tree/master/examples/sensors/aws-sqs.yaml).

## Trigger Workflow
As soon as there a message is consumed from SQS queue, a workflow will be triggered.

## How to parse JSON payload
As you know, the SQS message may be plan text or JSON. In case that you will send a JSON structure, you can define the `path` field.
For example, the SQS message is `{"foo":"bar"}` and on the resourceParameters section will be defined like this:
```yaml
resourceParameters:
- src:
event: "aws-sqs-gateway:notification-1"
path: "foo"
dest: spec.arguments.parameters.0.value
```

0 comments on commit c966b49

Please sign in to comment.