sql server - Service Broker queue rollback on receive -


as using base on here

service broker provides automatic poison message detection. automatic poison message detection sets queue status off if transaction receives messages queue rolls 5 times. feature provides safeguard against catastrophic failures application cannot detect programmatically.

i have windows service application polls sb queue , send them web service endpoint. since, should handle "server goes-off" issues ─get message queue, include "queue item receiving" , "queue item sending" methods same transaction. on first exception (httprequestexception), start pinging server predefined timeout continue/close program.

however, rolling 5 times problem, understand whatever time gap between 5 consecutive rollbacks increments rollback count globally, queue disabled eventually. right on this? queue has timeout zeroing rollback count?

if behaviour, better exclude "queue item sending" method transaction? if this, should follow approach that, on exception keep message in resource(table, file) sent later, or other alternatives...

what using tables queues keep transaction united , freed sb's rollback issue? reliable sb?

afaik, 5 consecutive rollbacks of same message on queue poison_message_handling = on disable queue regardless of time gap.

have considered turning off poison message handling queue? onus on application distinguish between true poison message (one can never processed) versus problem external service dependency. in first case, log problem message elsewhere , commit instead of rollback.

there other patterns 1 use, such re-queuing message , committing depends on whether messages must processed in order.


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -