DEV Community

Cover image for Azure ARM: Create Event Grid with Service Bus Queue Subscription
Markus Meyer
Markus Meyer

Posted on • Originally published at markusmeyer.hashnode.dev

4 1

Azure ARM: Create Event Grid with Service Bus Queue Subscription

Create an Event Grid Custom Topic and Service Bus Queue Subscription on Azure with ARM Template

Table of Contents

1 Objective

2 ARM Template

3 Deployment

4 Event Grid in Azure Portal

1 Objective

Messages have to be distributed to different receivers asynchronously.

Azure Event Grid Topic receives the message and the Azure Event Grid Subscription forwards it to Azure Service Bus Queue.

Sequence Diagram

2 ARM Template

The Azure ARM Template creates an Event Grid Topic with a dependency to the Service Bus.
Please find a detailed description at Microsoft.EventGrid topics template reference.

{
  "name": "[parameters('eventGridTopicName')]",
  "type": "Microsoft.EventGrid/topics",
  "location": "[parameters('location')]",
  "apiVersion": "2020-06-01",
  "dependsOn": [
    "[resourceId('Microsoft.ServiceBus/namespaces/', parameters('serviceBusNamespaceName'))]"
  ]
}
Enter fullscreen mode Exit fullscreen mode

The following extract creates the Event Grid Subscription with the ServiceBusQueue
endpoint. Please find a detailed description at Microsoft.EventGrid eventSubscriptions template reference.

{
  "type": "Microsoft.EventGrid/topics/providers/eventSubscriptions",
  "name": "[concat(parameters('eventGridTopicName'), '/Microsoft.EventGrid/', parameters('eventGridSubscriptionName'))]",
  "apiVersion": "2020-01-01-preview",
  "location": "[parameters('location')]",
  "dependsOn": [
    "[resourceId('Microsoft.EventGrid/topics/', parameters('eventGridTopicName'))]"
  ],
  "properties": {
    "destination": {
      "endpointType": "ServiceBusQueue",
      "properties": {
        "resourceId": "[resourceId('Microsoft.ServiceBus/namespaces/queues/', parameters('serviceBusNamespaceName'),  parameters('serviceBusQueueName'))]"
      }
    },
    "eventDeliverySchema": "EventGridSchema",
    "filter": {
      "isSubjectCaseSensitive": false
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

The complete ARM Template can be found in the GitHub Azure
/
azure-quickstart-templates
.

3 Deployment

Azure CLI:

az deployment group create --resource-group "EvalGrid" --name grid  --template-file .\azuredeploy.json --parameters "@azuredeploy.parameters.json"
Enter fullscreen mode Exit fullscreen mode

Deploy To Azure

4 Event Grid in Azure Portal

The Event Grid can found in Azure Portal.

grid-queue.png

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

AWS Security LIVE!

Hosted by security experts, AWS Security LIVE! showcases AWS Partners tackling real-world security challenges. Join live and get your security questions answered.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️