Quantcast
Channel: SQL Service Broker forum
Viewing all articles
Browse latest Browse all 461

Trigger sends message to queue when record changes - how to avoid duplicate messages?

$
0
0

Hello, 

I have a table trigger that sends a message to a service broker queue when a record is updated.  The queue kicks off a stored procedure that then schedules a run of an SSIS package that then stages the updates to be consumed by another application.  What I am finding is that a record can be updated multiple times while messages are waiting in the queue consumed and processed.  This is causing multiple messages for the same record, which then causes redundant and often contentious processing. Should I simply query the queue for messages containing the record ID and if one exists, skip adding another message?  It seems to me that I will run into timing issues with such an approach. 

Thank you very much for any direction shared.

...Rob


Viewing all articles
Browse latest Browse all 461

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>