Profile picture Schedule a Meeting
c a n d l a n d . n e t

NServiceBus Distributor Overview

Dusty Candland | |

Overview

The client sends messages to the distributors input queue on a remote machine. The server (or receiver) contacts the distributor asking for messages. As messages are sent to the distributor, it looks up the message endpoint in its configuration and sends the message to one of the servers waiting for work. It won’t send more to that server until it calls back to the distributor asking for more work. This stops those servers from ending up with a ton of unprocessed messages. Ayende has a good review of the Distributor here. The Colour Coding blog and this post on the Mailing list have more information about getting the samples working.

Client

The client configures the Message to go to the distributor data bus. This will be a remote queue in a distributed system.

Server

The server configures the Distributor control and data addresses on the UnicastBusConfig.

Distributor

This distributor using the distributor control bus for it’s input. Thd distributor data bus in setup in the appSettings along with the distributor storage queue. The UnicastBusConfig need to have the message objects it will receive with the input queue of the server, messagebus in this case. This value should not be a remote value as the server will contact the distributor asking for work. It’s important for the DistributorControlAddress and DistributorDataAddress to be empty otherwise the Distributor will be in an endless loop sending stuff to itself. It would seem that the distributor would know which workers can handle which messages, but it seems like that is not the case. In other words, if you want the server to be a client in some cases with the client being the server in those cases, you need to setup another distributor. It helps to think of the Distributor as the Distributor for a specific service. Like the Business Process 1 Distributor.

<!— relevant for a Serialization of "interfaces" or "xml" —> <!— can be either "xml", or "binary" —>

Webmentions

These are webmentions via the IndieWeb and webmention.io. Mention this post from your site: