Mirror Address RRS feed

  • Question

  • The service broker architecture gives us the ability to create a route that has a mirror address. I assume that means that the mirror db get the same message as the primary db. 

    The ability to mirror doesn't make sense, unless it is only used for some kind of logging (uni-directional type of application). my assumption is that mirror db service cannot reply unless it knows it has switched to primary.

    I am missing something fundamental about route mirroring

    And my last question, is there a way for the mirror to know it is in mirror mode from the incomming message.


    Friday, January 23, 2009 6:06 AM


  • The messages are sent only to the database acting as the principal role. The mirrored route has two addresses in order to be able to connect to both servers and interogate the current principal. Also in case of a failover the mirrored route is able to automatically switch over to the new principal in real time.

    As for the service receiving the message only the online database (ie. the one acting as principal) can do any sort of activity (like receiving messages, activating procedures and sending messages). The database acting as mirror will is in recovery mode, so is basically untouchable by anyting, including Service Broker.

    So if a service hosted in a mirrored database is activated and starts processing a message it can rest assured that it can only be the principal role.

    • Marked as answer by Haroon Said Wednesday, May 20, 2009 8:40 PM
    Friday, January 23, 2009 7:18 AM