/
Publisher-Subscriber Pattern

Publisher-Subscriber Pattern

Problem

  • Use asynchronous messaging to decouple senders from consumers and avoid blocking the sender to wait for a response.

  • Provide info to other components as events.

 

Solution

  • An event as a message that notifies other components about a change or an action that has taken place.

  • Workflow is based on an input channel and an output channel, one outpout channel per consumer and consumer is known as subscriber.

image-20240827-173316.png

Publisher-Subscriber In Practice

image-20240827-191649.png

Diagram shows an enterprise integration architecture that uses Service Bus to coordinate workflows, and Event Grid to notify subsystems of events that occur.