NextGen APIs

Async APIs Design Guidelines

Table of contents

AWS SNS-SQS guidelines

Instances of SNS and SQS

Filtering between SNS and SQS

DON’T create filters when subscribing an SQS Queue to an SNS Topic. No filtering is currently allowed on our Cloud infrastructure (message attributes, message payload).

AWS Objects naming

SNS Topic Name

[PlatformSolution]-[Application]-[Domain]-[Entity]-[Event]-[Environment]

SQS Queue Name

[PlatformSolution]-[Application]-[ConsumerService]-[Entity]-[Event]-[Environment]

Variables details

  • [PlatformSolution]: The name and progressive number of the Solution within NextGen Platform (e.g.: s000001).

  • [Application]: The name of the application that publishes events to a topic or subscribes to a queue (e.g.: fsm, geo, fsm-water).

  • [Domain]: The Domain to which the entity belongs (see NextGen APIs - Domains and Subdomains).

  • [Entity]: The name of the REST resource to which the event is referring. If no REST resource exists, please use the name of the underlying BusinessObject, DTO, of the best human-readable functional name available (e.g.: agenda-outcome).

  • [Event]: Which operation has been done in the system, usually created, updated, deleted.

  • [Environment]: The type of environment, usually dev, test, prod.

  • [ConsumerService]: Domain or Subdomain that will handle the event listened by the SQS queue (see NextGen APIs - Domains and Subdomains). Alternatively, the best representation of the objective of the SQS queue, it could be external system integration, internal data alignment, a customization, etc.

Example

  • Platform Solution: s000001

  • Platform Application name: fsm1

  • Domain: work-orders

  • Entity: work-orders

  • Event: updated

  • Consumer 1: sap-intgr (an integration service sending data to SAP)

  • Consumer 2: messages (subdomain, in this case a service sending push messages to technicians)

Environment

Resource Type

Resource Name

DEV

SNS Topic

s000001-fsm1-work-orders-work-orders-updated-dev


SQS Queue (1)

s000001-fsm1-sap-intgr-work-orders-updated-dev


SQS Queue (2)

s000001-fsm1-messages-work-orders-updated-dev


DLQ (1)

s000001-fsm1-sap-intgr-work-orders-updated-dlq-dev

TEST

SNS Topic

s000001-fsm1-work-orders-work-orders-updated-test


SQS Queue (1)

s000001-fsm1-sap-intgr-work-orders-updated-test


SQS Queue (2)

s000001-fsm1-messages-work-orders-updated-test

PROD

SNS Topic

s000001-fsm1-work-orders-work-orders-updated-prod


SQS Queue (1)

s000001-fsm1-sap-intgr-work-orders-updated-prod


SQS Queue (2)

s000001-fsm1-messages-work-orders-updated-prod