When to use pubsub

NB: Apologies to bump up an old thread here, but this topic really tempted me to do so.

I will outline the benefits of pub sub model to below:

  1. Multiple targets – When a data source has multiple targets involved, the pub sub model finds its best usability. The publisher can publish the document, all the system requiring similar data can subscribe to this document and fetch.

  2. Decoupled and flexible to Scale – The software built on pub sub model are loosely coupled (publisher & subscriber are decoupled) and hence flexible for any future change. Adding or changing functionality won’t send ripple effects across the system, because Pub/Sub allows you to flex how everything uses everything else.

  3. Guaranteed delivery – It has several checkpoints that allows – when the intermediatory platform/ system are not available it will re-attempt to process the data.

The Cons that I see in this:

  1. Infrastructure overhead and regular UM patching required - Messaging provider eg: Universal Messenger (UM) which acts as the intermediary for this process must be regular patched for issues and as well be frequently monitored and addressed over in case of issue - otherwise we can have a lot of data losses happening, which can be quite impact-full especially in Banking transactions.