Rediger

Create, view, and manage event subscriptions in namespace topics

An event subscription defines how a consumer receives events published to a namespace topic. This article shows you how to create, view, and manage event subscriptions to namespace topics in Azure Event Grid by using the Azure portal.

When you create an event subscription, you choose either pull or push delivery. With pull delivery, your application connects to Event Grid to read events at its own pace. With push delivery, Event Grid sends events to a destination that you configure. To learn more about these options, see Pull delivery overview and Push delivery overview.

Prerequisites

Create an event subscription in a namespace topic

  1. In the Azure portal, go to the namespace topic that you want to use for the event subscription. For steps to locate a topic, see Create, view, and manage namespace topics.

  2. In the Entities section, select Subscriptions.

    Screenshot showing Event Grid event subscriptions.

  3. On the Subscriptions page, select + Subscription.

    Screenshot showing Event Grid event subscription create.

  4. On the Basics tab, enter a name for the event subscription, and then select the delivery mode.

    Important

    When you create a subscription, choose either the Pull or Push delivery mode. To learn more about the consumption modes available in Event Grid namespaces, see Pull delivery overview or Push delivery overview.

    The following screenshot shows the settings for a pull delivery subscription:

    Screenshot showing pull event subscription creation.

    The following screenshot shows the settings for a push delivery subscription:

    Screenshot showing push event subscription creation.

  5. On the Filters tab, add the event types that you want to filter on, and add any context attribute filters that you want to use in the subscription.

    Screenshot showing Event Grid event subscription create filters.

  6. On the Additional features tab, set the lock duration in minutes, specify the maximum delivery count, and then select Create.

    Screenshot showing Event Grid event subscription create additional features.

View an event subscription in a namespace topic

  1. Go to the namespace topic that contains the event subscription that you want to view. For steps to locate a topic, see Create, view, and manage namespace topics.

  2. In the Entities section, select Subscriptions.

    Screenshot showing Event Grid event subscriptions.

  3. Search for the subscription that you want to view, and then select it.

    Screenshot showing Event Grid event subscriptions search.

  4. Review the event subscription settings.

    Screenshot showing Event Grid event subscription.

Delete an event subscription in a namespace topic

  1. Go to the namespace topic that contains the event subscription that you want to delete. For steps to locate a topic, see Create, view, and manage namespace topics.

  2. In the Entities section, select Subscriptions.

    Screenshot showing Event Grid event subscriptions.

  3. Search for the subscription that you want to delete, and then select it.

    Screenshot showing Event Grid event subscriptions search.

  4. On the Overview page, select Delete on the toolbar.

    Screenshot showing Event Grid event subscription deletion.

  5. On the confirmation page, enter the name of the resource, and then select Delete to confirm the deletion.

    Screenshot showing Event Grid event subscription deletion confirmation.

Configure filters for a namespace topic subscription

  1. To update the filters for an existing subscription, go to the subscription, and then select Filters in the Settings section. Add the event types that you want to filter on, add any context attribute filters that you want to use, and then select Save.

    Screenshot showing Event Grid event subscription filters settings.

Simplified filtering model for namespace topic subscriptions

Event subscriptions under a namespace topic have a simplified filtering configuration model compared to event subscriptions to domains and to custom, system, partner, and domain topics. The filtering capabilities are the same, except for how you configure filters on the subject attribute. The following sections explain the differences.

Filter on event data

You can filter events based on values in the event data object when the event data is a JSON object. For more information, see Event subscriptions.

Subject begins with

No dedicated configuration properties specify filters on subject. To filter the context attribute subject with a value that begins with a string, use the following filter configuration.

key value operator value
subject String begins with your string

Subject ends with

No dedicated configuration properties specify filters on subject. To filter the context attribute subject with a value that ends with a string, use the following filter configuration.

key value operator value
subject String ends with your string