Kamel Keb
Kamel Keb

Reputation: 393

With Service Broker, how to know when all sent messages have been processed by a target service?

Pretty new in the use of SS Service Broker, I'm not able to find a simple way to know when all sent messages have been processed.

I'm using Service Broker to multithread a task by splitting it into many small pieces, but the execution flow needs all the atomic tasks to have been successfully processed in order to continue its way.

Any suggestions about the manner we can structure things around to achieve this aim?

Upvotes: 0

Views: 250

Answers (1)

Remus Rusanu
Remus Rusanu

Reputation: 294407

You must explicitly send a response from the target, acknowledging the processing. And remember that is perfectly valid for the target to process the message a month after you sent it. So don't block waiting for a response, the initiator should be event driven and respond to message in his queue.

Upvotes: 1

Related Questions