locked
SqlDependency - Broker auto disabled RRS feed

  • Question

  • I recently started to integrate broker service in to my NET server app to invalidate/refresh cached data as using through SqlDependency.

    However just found out "poison message" such as rollback and database error multiple occurance will cause the broker auto disabled.

    I tried to create a queue:

    CREATE QUEUE MyBrokerQ
    WITH STATUS = ON,
    POISON_MESSAGE_HANDLING (STATUS = OFF)

    But having problem as SqlDependency.Start(ConxStr, "MyBrokerQ") doesn't seems to work, i revert this back to just SqlDependency.Start(ConxStr)

    I tried to incorporate code to detect when the broker is down, attempt to renable it through SQL:

    ALTER DATABASE MyDb SET ENABLE_BROKER

    However this will cause timed-out, and I believe connected sql session will disrupt it.

    I'm getting the impression SqlDependency/broker service is not the right choice for me.

    If u know any proper way to do it through .NET 4.5 (I'm using EF6 too), let me know.

    As far as I researched, I only found code samples, and none of these mentioned about the auto-disabled, until I encountered and research for resolution.

    Monday, November 30, 2015 11:09 AM

All replies

  • Hi Kelmen,

    Thanks for posting in this forum.

    I help you escalate the issue and there will be other engineers to help you further. Thanks for your understanding.

    Best regards,

    Kristin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, December 1, 2015 7:41 AM