2

What is "GridInterceptingMessageHandler"? I did a search and I can find no mention of this on nservicebus.com. Also, I see the samples have the line:

.LoadMessageHandlers(First<GridInterceptingMessageHandler>.Then<SagaMessageHandler>())

What does that do exactly?

2 Answers 2

2

If you look at the source and its documentation you'll see the following:

Intercepts all messages, not allowing any through if the endpoint has had its number of worker threads reduced to zero.

GridInterceptingMessageHandler

2

NSB allows you to dynamically tune the number of work threads and endpoint is using to process messages. If the number of work threads has been reduced to zero, the endpoint becomes disabled and will not continue to process messages. The tuning of threads is useful if you would like to increase the speed of message processing(assuming everything else will scale as well) while not having to restart the endpoint.

This is especially helpful if you want to slowing drain the system of messages so that you can perform upgrades or other maintenance duties. By default this is wired up for you, you would only reference it if you decided to override how the message handlers are loaded(as in the example).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.