Skip to content

Instantly share code, notes, and snippets.

@LuisCusihuaman
Last active August 10, 2022 13:49
Show Gist options
  • Save LuisCusihuaman/3985681baf655452d6877b10446c98ed to your computer and use it in GitHub Desktop.
Save LuisCusihuaman/3985681baf655452d6877b10446c98ed to your computer and use it in GitHub Desktop.
asyncapi: 2.4.0
info:
title: Account Service
version: 1.0.0
description: This service is in charge of processing user signups
channels:
user-signedup:
description: A user has signed up for our service
publish:
message:
$ref: '#/components/messages/UserSignedUp'
operationId: receiveMessage
description: receive messages from the topic
bindings:
sns:
consumers:
- protocol: sqs
endpoint: null
name: user-signedup-queue
rawMessageDelivery: true
filterPolicy:
attributes:
reason:
anything-but: password-reset
reDrivePolicy:
deadLetterQueue: null
name: user-signedup-queue-dlq
sqs:
queues:
- name: user-signedup-queue
type: standard
receiveMessageWaitTime: 4
policy:
statements:
- effect: Allow
principal: '*'
action: 'Sqs:SendMessage'
- effect: Allow
principal: '*'
action: 'Sqs:ReceiveMessage'
- name: user-signedup-dlq
messageRetentionPeriod: 1209600
type: standard
components:
messages:
UserSignedUp:
payload:
type: object
properties:
displayName:
type: string
description: Name of the user
email:
type: string
format: email
description: Email of the user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment