1

As per the Microsoft article - https://learn.microsoft.com/en-us/azure/event-hubs/event-hubs-geo-dr

By design, Event Hubs geo-disaster recovery does not replicate data, and therefore you cannot reuse the old offset value of your primary event hub on your secondary event hub. We recommend restarting your event receiver with one of the following methods:

  1. EventPosition.FromStart() - If you wish read all data on your secondary event hub.
  2. EventPosition.FromEnd() - If you wish to read all new data from the time of connection to your secondary event hub.
  3. EventPosition.FromEnqueuedTime(dateTime) - If you wish to read all data received in your secondary event hub starting from a given date and time.

I have an Azure Event Hubs in WEST US with Geo-Recovery enabled to sync with EAST US thinking that I should be able to failover in case of Disaster that would impact the WEST US however the above Microsoft article says that geo-disaster recovery does not replicate data, what does it mean?

One Developer
  • 99
  • 5
  • 43
  • 103

1 Answers1

3

Basically you already have all your answer in the text you copied from the docs ;)

To rephrase it: The geo-recovery feature brings you first and foremost one thing: Clients do not need to change their connection string when you fail over your Event Hub from one region to another. The DNS name under the hood resolves now to the new region and all access polices (credentials) are also valid in the second region.

However, data that was already sent to the primary region is not available in the second region when you fail over. The secondary Event Hub is "empty" in that sense when clients start sending data to it after you fail over.

silent
  • 14,494
  • 4
  • 46
  • 86
  • If the data is sent to the primary region and synced with the secondary region but not yet read by the consumer, it should be available in the secondary region, correct? – One Developer Feb 16 '21 at 02:55
  • Are we saying Geo-Recovery doesn't take care of the data but only the Infrastructure? – One Developer Feb 16 '21 at 02:58
  • 1
    Data does not get synced. Only entities like consumer groups, event hubs (inside a namespace) and access policies – silent Feb 16 '21 at 08:13
  • In case of a manual failover, is there way to copy the data from the Primary region to secondary region that is not yet consumed? if not, any reason why the unread data can be copied over? – One Developer Feb 16 '21 at 08:33
  • 2
    I don't know how else to say it: Data is not replicated. unless you use something like this which you need to set up yourself https://learn.microsoft.com/en-us/azure/event-hubs/event-hubs-federation-replicator-functions – silent Feb 16 '21 at 12:30