This is where durable reliable state change technologies like ShareJS and operational transform come in. pub/sub is transient in nature, whereas the problem you are actually solving is synchronization, which needs to work if the device is waking up after 1 month. In a RequireJS/Derby app, your server would be storing a JSON diff of every update to a collection, alongside the collection itself. And ShareJS calls that the "ops" or JSON-diffs table, whereas your usual collection is called the "snapshot". So then what your client should do in response to a pubsub event is trigger its "fast sync" process, which is simply doing an RPC to ask the server for all the JSON diffs (or "ops" documents) since your last sync, which is a watermark in the form of a MongoDB ObjectID of the last ops document.
The great thing about SocketStream is that you can do one of these fast-syncs in 2ms. So whenever you get notified of anything, all you really need is the collection name. Plus, you put your fast sync logic in "ss.server.on(connected)", so that your PhoneGap app just automatically starts getting the updates whenever its WAN link comes back online.
It goes without saying that your PhoneGap app should be built against a local database, so that it is not just another one of these fake mobile "tethered" apps. So then what you're left with is doing the data upload and conflict resolution part of your PhoneGap app, which is by nature very business domain specific.
You could use a service like Simperium if you wanted to outsource all of this, but you give up hosting your own data, and it's also too expensive for my taste.
David