Event grid custom topic with blob storage and queue storage as event handler

Hemanth 0 Reputation points
2023-04-18T06:33:15.42+00:00

If I use storage account as event topic (custom), it automatically expects for an existing system topic during a event subscription creation fyi. which means we cannot create a custom topic with storage account if the topic type is storage account. User's image

our request is to

  1. Create a event grid topic with private endpoint as my event source would be blob storage
  2. Create event subscription for that topic
  3. the event handler should be either Storage queue or Webhook.
  4. Destination: queue storage (to store events)
  5. Is it mandatory to use topic type: storage accounts while creating event subscription and a system topic.
  6. What would be your best advise here? Also, If I prefer a webhook, what would be the best practice to trigger/create a webhook? Thank you,
Azure Event Grid
Azure Event Grid
An Azure event routing service designed for high availability, consistent performance, and dynamic scale.
454 questions
{count} votes

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA 90,641 Reputation points Moderator
    2023-04-19T05:08:48.4766667+00:00


    Hemanth
    - Thanks for the question and using MS Q&A platform.
    You are correct that if you use a storage account as the event topic type, it requires an existing system topic during event subscription creation. This means that you cannot create a custom topic with a storage account as the topic type.

    To create an Event Grid topic with a private endpoint as the event source and a storage queue or webhook as the event handler, you can follow these steps:

    Create an Event Grid custom topic with a private endpoint. You can do this by following the steps in the Azure documentation for creating an Event Grid custom topic with a private endpoint.

    Create an event subscription for the custom topic. In the event subscription configuration, specify the storage queue or webhook as the event handler. You can do this by following the steps in the Azure documentation for creating an event subscription.

    Test the event subscription by uploading a file to the blob storage account. This should trigger an event that is sent to the Event Grid topic, which in turn should send the event to the storage queue or webhook specified in the event subscription.

    It is not mandatory to use the topic type "storage accounts" while creating an event subscription and a system topic. You can use other topic types such as "custom" or "event hubs" depending on your use case.

    If you prefer to use a webhook as the event handler, you can create a webhook endpoint that can receive the events from the Event Grid topic. You can do this by creating an HTTP-triggered Azure Function or a web API that can receive the events and process them. You can then specify the URL of the webhook endpoint in the event subscription configuration.

    In terms of best practices, it is recommended to use HTTPS for webhook endpoints to ensure secure transmission of events. You can also use authentication mechanisms such as shared access signatures (SAS) or OAuth to secure the webhook endpoint.

    I hope this helps you create an Event Grid topic with a private endpoint and a storage queue or webhook as the event handler. If you have any further questions or concerns, please let me know.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.