Comparing the Options for Publish-Subscribe

As mentioned previously, the task of enabling a component to notify other components of changes to data, or transpired events, is a common problem in component-based development. The basic flow works like this:

  1. Component A publishes the fact that it can notify any component of a given event (such as inventory being received).

  2. Component B makes it known that it wants to be included in the list of components that are notified of this change by virtue of subscribing to this event.

  3. When the change does occur, Component A notifies all subscribing components of the change.

Now that you have a basic outline of the problem, the players involved, and how they would interact, we will take a look at some options ...

Get COM+ Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.