Monica Shiralkar wrote:
Based on what exactly can we say that Kafka supports pub/sub. For producer-consumer I know, but for pub-sub?
Pub/Sub is the classic topic based messaging -- meaning every subscriber on the topic gets every message from every publisher on the same topic. Producer/Consumer is the classic queue based messaging -- meaning all the messages from all the producers are queued, and then any message will only be delivered to only one consumer.
Pub/Sub are generally used for stuff like market data, where everyone needs to see everything. And queuing is good for stuff like orders, where only one consumer should be processing the order. Using the stock market as an example, when you want to see if you would like to buy/sell a stock, you want to see all executed trades on all markets to decide at what price you want to buy/sell at. However, when you actually buy or sell the stock, you only want one of the markets to take the order -- since you only want to make one trade.
IIRC, I thought Kafka supported both.
Henry