1.1.15 • Published 1 year ago
cds.email-subscription v1.1.15
cds.message-consumer-template
A template repository for CDS message consumers
To create a new CDS Message Consumer based on template, do the following steps:
- Create a new repository using a template repository cds.message-consumer-template.
Configure function.json file:
{ "bindings": [ { "name": "message", "type": "serviceBusTrigger", "direction": "in", "topicName": "sample-topic-name", "subscriptionName": "sample-subscription-name", "connection": "Connector_ServiceBus__fullyQualifiedNamespace" } ], "scriptFile": "../dist/MessageConsumer/index.js", "disabled": false }
Change MessageConsumer folder name for a unique name like "sampleMessageConsumer", and change directory in "scriptFile" field in the function.json file.
To run the consumer on the local environment, add local.settings.json file in the main application directory:
{ "IsEncrypted": false, "Values": { "FUNCTIONS_WORKER_RUNTIME": "node", "AzureWebJobsStorage": "", //Unused key, but it's required by Azure Function "OutputBlobStorage__serviceUri": "", //Connection string to the Azure Blob Storage "ServiceBus__fullyQualifiedNamespace": "" //Connection string to the Azure Service Bus } }
Run npm install
- Run npm start
To install @cantire-corp packages locally, add .npmrc file in the main application directory:
//npm.pkg.github.com/:_authToken=${YOUR_AUTH_TORKEN_NAME} registry=https://npm.pkg.github.com/cantire-corp
To run the logger locally, add .env file in the main application directory:
LOG_LEVEL="info" LOGS_FOLDER="logs"
1.1.15
1 year ago