I am trying to add multiple subscription support for mod_pubsub.
I have a few questions about the mod_pubsub code. The first question is the usage of the pubsub_state record and why is it used for affiliations and subscriptions. After looking at the code, it seems to add this multiple subscription feature. I would save the generated subid in this pubsub_state record and when an item is published the subid will be in the headers. I am reluctant to add a subid item in the pubsub_state record because it doesn't seem to fit with affiliations.
Thanks for any help given.
Design idea
To implement multiple subscription i would add a list to pubsub_state record. This list would contain tuples of subscription id and subscription options, that is: [{SubId, SubOpts}]
Adding that list to pubsub_state record is not bad even if it has no relation to affiliation: in that case affiliation is set to none.