Hi @Leonty Lahman
Welcome to Microsoft Q&A platform and thanks for posting your query here.
Great question! Azure Event Hubs Geo-disaster recovery (Geo-DR) provides primary and secondary namespaces but automating the failover process requires some setup since there isn’t a fully automated service for this yet.
Here’s how you can approach it:
- You can use Azure Monitor or Application Insights to monitor the health of your Event Hub namespaces. These services can alert you if the primary namespace becomes unavailable.
- While failover itself must be triggered manually or via API, you can automate it by creating an Azure Function or a Logic App.
- The function can listen for alerts (from Azure Monitor) and trigger the failover by calling the Event Hubs Geo-DR failover API. Here's the API documentation: Failover API
- Once the primary namespace is available again, you’ll need to reconfigure it manually or through automation scripts to restore it as the active namespace.
If you’re looking for a more streamlined solution, you could combine these tools into a workflow:
- Azure Monitor for detecting downtime.
- Azure Function or Logic App for triggering failover.
- PowerShell or Azure CLI for post-failover operations.
Hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.