Forward events from one Azure Event Grid namespace topic to another namespace topic (Preview)
Forwarding events from one Azure Event Grid namespace topic to another namespace topic is a straightforward process that enhances the flexibility and scalability of your event-driven architecture. Whether you're working within the same resource or across different resources, Azure Event Grid namespace provides a seamless way to forward events efficiently.
You can forward events from a topic in one namespace to another topic in the same namespace.
You can also forward events from a topic in one namespace to a topic in another namespace.
Enable managed identity for the source namespace
In this step, you enable managed identity for the source namespace (namespace that contains the source topic). Select the identity that fits better to your scenario. See Best practice recommendations for managed system identities. Here, we use system assigned identity for demo purposes.
Navigate to the Azure portal page for the namespace that has the source topic.
Select Identity on the left navigation menu.
On the System assigned tab, select On for Status.
Select Save on the command bar to save the setting.
On the popup window, select Yes to confirm enabling of managed identity for the namespace.
Confirm that the system-assigned managed identity is assigned to the namespace that has the source topic.
Grant identity the permission to send events to the destination topic
In this step, you add the managed identity of the source namespace to the Event Grid Data Sender role on the destination namespace. This step enables the source namespace to be able to send or forward events to the destination namespace.
Navigate to the Azure portal page for the namespace that has the destination topic.
Select Access Control (IAM), and then select Add a role assignment.
On the Role tab of the Add role assignment page, select the EventGrid Data Sender role, and then select Next.
On the Members tab, select Managed identity, and then select + Select members.
In the Select managed identities window, follow these steps:
Now, on the Add role assignment page, select Review + assign.
On the Review + assign page, review settings, and select Review + assign.
Create an event subscription to the source topic with destination topic as the endpoint
In this step, you create an event subscription on the source namespace topic using the destination namespace topic so that the events are forwarded to the destination namespace topic.
Navigate to the source topic page in the Azure portal. On the Event Grid Namespace Topic page, select + Subscription on the command bar.
On the Create Subscription page, enter a name for the event subscription.
Select Event Grid Namespace Topic as an endpoint destination, and select Configure an endpoint.
On the Select Event Grid Namespace Topic page, follow these steps:
Select the Azure subscription, Resource group, and Event Grid namespace in which the destination namespace topic exits.
For Event Grid Namespace Topic, select the destination namespace topic.
In the Managed identity for delivery section, select Refresh.
Select the system assigned managed identity for your source topic, and then select Create.
Related content
For a list of supported event handlers, see Namespace topic push delivery event handlers.