Posts

Showing posts from May, 2011

NServiceBus subscription storage

In a production deployment, publishers persist their subscriber information for two reasons: 1. A scaled-out logical publisher (say, a load-balanced web service that needs to publish events) consists of multiple physical publishers, which all need to have the same subscriber list. 2. If a physical publisher goes down and comes back up, it needs to be able to rehydrate its subscriber list without the subscribers needing to re-send their initialization messages.

NServiceBus distributor configuration

Technical notes from figuring out how to deploy NServiceBus in a distributed environment, beyond the simple development setups: 1. In a pub-sub scenario, distributors do not need any configuration specific to the publisher they are distributing for, or the subscribers they are distributing to. The configuration they do need is to mainly to define unique queue names for the queues that the distributor owns: NServiceBus.Distributor.dll.config: <add key="DataInputQueue" value="MyDistributorDataInputQueue" /> <add key="ControlInputQueue" value="MyDistributorControlQueue" /> <add key="ErrorQueue" value="MyEnterpriseErrorQueue@machine" /> <add key="StorageQueue" value="MyDistributorStorageQueue" /> At runtime, the subscriber contacts the distributor, sending it a subscription message that includes the publisher's address and the subscription message type. This makes the distribu...