MassTransit

 

Publish Subscribe

Page history last edited by drusellers 4 mos ago

Goal: How can a sender broadcast an event to all interested recievers?

- Hohpe, Woolf EIP

 

What is Pub/Sub trying to achieve?

By employing the pattern of publish and subscribe we are trying to break the coupling between our systems. The pattern accomplishes this by allowing the publisher to have no knowledge of who is subscribing. 

 

example:

bus.Publish(message);

 

As you can see here, the publisher has no knowledge of who is interested but magically the messages are delivered.

 

So how does this work?

At a high level each instance of ServiceBus has a SubcriptionClient that works with the SubscriptionService to bring this information local to your instance. When you want to publish something this local 'phone book' finds out who is interested and sends the message straight to them.

 

-d

 

 

Comments (0)

You don't have permission to comment on this page.