Reputation: 10591
Related to this question: As I understand it, two physical publishers represent a single logical publisher must each have their own subscription queue. Using DBSubscriptionStorage allows them to have a common list of subscribers, but what happens when a new subscriber pops up and subscribes? The subscribe message will go onto one of the subscription queues and then into the database. Is there any way, short of restarting the other publishers, that they can be made aware of the new subscriber?
Upvotes: 1
Views: 385
Reputation: 6050
2 Physical Publishers with Many Subscribers
Configuration
Processing
You will have to decide if all Subscribers are interested in the same messages. It is ok to have both Publishers publish the same messages as each Subscriber will only subscribed once(either at P1 or P2). You have full control on how to "load balance" the work. More information can be found here if you haven't looked at it already
Upvotes: 1
Reputation: 5267
You have a couple of options. One of the easiest is to have each of the separate physical publishers pointing to a single physical subscriber/subscription database.
Another really good way to handle it is with database replication. The only problem with replication is that it's inherently "one way". Even so there's a really interesting project for MySQL called "MySQL MMM" that seems to be a perfect fit for this scenario.
Finally, you could potentially have your own subscription storage using something like Membase which is a persistent, replicated key/value store.
Bottom line: you can have a single subscription database which is the easiest, but you have a failure point. Or you can have a replicated subscription storage. The replicated storage will ensure that all nodes have a list of all subscribers.
Upvotes: 1