Tuesday, October 07, 2008 10:50 PM
I was having a discussion with a friend about MassTransit about the purpose of the subscription (pubsub) service in MT, and I thought I would address the issue here.
Basically, the subscription service is what allows us to 'publish' messages. At a high level, before the bus does a publish it consults with the subscription service to see if there are any susbscribers. If there are, then each subscriber gets a copy of the message. Otherwise, nothing is sent.
At a lower level there is a subscription client that cache's the subscriptions locally to the service, and it is this cache that is consulted pre-publish. The cache is kept up-to-date via messaging (whoda thunk) so that there is a minimal amount of polling.
Therefore, if the subscription service (and the client) is not running, then nothing will be sent. As you can see its a pretty important part of the system. :)
Ok, so that wasn't as awesome as I had hoped but hopefully it helps.
-d