1
votes

I am having a slight issue with NServiceBus distributor and this probably my own ignorance but this is what's happening -

I have -
a. 2 Workers (Server) processes running on 2 machines
b. 1 Distributor process posting messages to the workers
c. 1 Client process posting messages to the distributor

Now it all works OK, when all servers are up and running.

Say, I now shut down Worker process #1 such that only Worker process #2 is running. I now wait for some time and then start posting messages to distributor, what I notice is that invariably some messages end up being queued to worker process #1 (the process that was shut down).

Now I suppose this happens because before shutting down the server had indicated to the distributor that it was ready and the distributor was responding to these control messages.

My question is that is there a way to gracefully close a worker connected to a distributor informing it that no more messages should be queued to it.

Thanks.

1

1 Answers

2
votes

You can gradually dial down the number of worker threads of a worker node by sending it ChangeNumberOfWorkerThread messages. There is a management tool under the grid directory (i think) that you can use, just need to enter in the distributor queue and each of the worker queues.