From 13cb29de8da834c5da7fac8a78b91bf4e8dbba6b Mon Sep 17 00:00:00 2001 From: catalinvr Date: Fri, 11 Oct 2019 14:37:10 +0200 Subject: [PATCH] 363 update the SQS gateway documentation (#371) --- docs/gateways/aws-sqs.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/gateways/aws-sqs.md b/docs/gateways/aws-sqs.md index 19bf12b845..7aa254d35a 100644 --- a/docs/gateways/aws-sqs.md +++ b/docs/gateways/aws-sqs.md @@ -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 +```