Publish/Subscribe vs Producer/Consumer?

后端 未结 3 1361
生来不讨喜
生来不讨喜 2021-01-01 16:08

From messaging point of view with systems like kafka, rabbit, hornet mq, activemq etc... Is there a difference between pub/sub and prod/con or are they used interchangeably?

3条回答
  •  梦毁少年i
    2021-01-01 16:24

    As per my understanding - Prod/Consu - Producer produces and Consumer consumes the produced task . - Publisher/Subscriber - Publisher produces and Subscriber consumes the produced task only if Subscriber is subscribed to Publisher.

    Both can be interchanged but the later one makes sense in terms of Architectural real use cases .Produce and publish only if it is subscribed based upon subscription agreement .

    Thanks

提交回复
热议问题