Message Queue Services (Stack9-core v3.0)
In Stack9 version 2.0.0 it was introduced the ability to interact with message queue services (AWS SQS & Azure Queue Storage)
Environment variables
These enviroment variables should be configured in order to start using message queue service in stack9
- MESSAGE_QUEUE_POLLING_WAIT_TIME_MS // defaults 10000ms (10s)
- MESSAGE_QUEUE_CREATE_IF_NOT_EXISTS // true or false
- MESSAGE_QUEUE_SERVICE // 'aws-sqs' or 'azure-queue-storage'
- MESSAGE_QUEUE_QUEUE_URL // http://localstack:4566/000000000000/stack9-core-sqs or http://azurite:10001devstoreaccount1/stack9-core-sqs
- WORKFLOW_NOTIFICATION_SEND_GRID_DEFAULT_TEMPLATE_ID // d-123528a80a1022aab9a5d91afaf08b9a
Requires Authorization
AWS - AWS_REGION - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY
Azure
- AZURE_QUEUE_STORAGE_CONNECTION_STRING // DefaultEndpointsProtocol=<http|https>;AccountName=<account-name>;AccountKey=<account-key>;BlobEndpoint=<blob-endpoint>;
Stack9-config
In stack9.config.json
the message queue service should be specified in order to be enabled.
"MessageQueueService": "aws-sqs", "MessageQueueServiceOptions": ["aws-sqs", "azure-queue-storage"]
When running locally, a docker container with localstack will be started to mock SQS service when chosen
aws-sqs
and azurite forazure-queue-storage