Hi, Topic message subscription practically means to be real time. Most brokers handle topic messages in-memory whereas WSO2 Message Broker store each topic message as well to provide clustering support for subscribers (publish to Node1 and subscribe from Node2).
Think of a scenario where there are multiple topic subscribers. We do not duplicate the message for each subscriber, rather do reference counting. Message is considered as delivered if all topic consumers sent the ACK to the server. Now, when there is a slow topic consumer, even though all other subscribers ACK the message, as there is no ACK from the slow consumer, we need to keep the message metadata in memory for reference counting. If the situation is kept for millions of messages MB server will go Out of Memory because of the slow consumer. Thus solution to this problem is, >> duplicate messages per subscriber and put to the database. This solution is not going to scale with subscription count. Also will use many I/O, memory >> drop messages in the middle. This is not also a good solution if data is mission critical. >> Give the choice to the user. He can either loose messages or bare the risk of going server Out of Memory. We did a internal discussion and landed on the third option. -- *Hasitha Abeykoon* Senior Software Engineer; WSO2, Inc.; http://wso2.com *cell:* *+94 719363063* *blog: **abeykoon.blogspot.com* <http://abeykoon.blogspot.com>
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
