-2

I am developing a .net core application where I would like to create an Azure Event Subscription to Azure blob storage in C#. I've set up a Event Grid System Topic

This Event Grid Topic is supposed to have a subscription that listens to events on Blobstore (created, delete, rename) and pushes them to a Service bus.

I would like to create an EventSubscription in C# but I can't find any references.

Arshad Badar Khan
  • 942
  • 1
  • 12
  • 32

1 Answers1

0

Eventgrid operates as a push and forget mechanism. So you can't have your aplication polling Event grid for an event. You need to have your application triggered by Event grid instead. The most suitable option would be an Azure function with is triggered by Event grid. See Link.

You can use a service bus output binding to write to Service bus. Refer to this documentation.

Anupam Chand
  • 2,209
  • 1
  • 5
  • 14
  • i think u misunderstood.. i would like to be able to create a Topic and subscription in C# just like we can in Service bus – Arshad Badar Khan Aug 05 '22 at 14:11
  • Why not use the rest Apis https://learn.microsoft.com/en-us/rest/api/eventgrid/controlplane-version2021-10-15-preview/event-subscriptions. You can call rest Apis using .Net – Anupam Chand Aug 05 '22 at 16:19