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?
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
Although both Publish/Subscribe and Producer/Consumer terms are related to messaging, they are different and can't be used interchangeably.
Publish/Subscribe is a messaging pattern where a publication is distributed to multiple receivers. A Producer is the sender of messages and consumer is the receiver of messages. Producers and consumers are an integral part of both Publish/Subscribe and Point-to-Point messaging patterns.
Hope this helps.
There is a difference between the publish/subscribe and producer/consumer models.
Publish/Subscribe : Subscribers subscribe to the publisher. Each message the Publisher publishes is sent to all the subscribers. That is, all subscribers receive the same message. (Think of a newspaper or magazine subscription. All subscribers receive the same magazine or newspaper)
Producer/Consumer : Each message the producer produces will be consumed by a single consumer. This is a mechanism to distribute the work load to multiple consumers. (Think of the several cash registers at the supermarket. Each customer goes to a single cash register. The customers are like the messages that are produced and the cash registers are the consumers)