I'm looking for some guidance as I have just signed up to try PubNub but have found the description of how storage works a little confusing. I am currently writing some apps that I want to use PubNub as a means of creating group chat and 1 to 1 messaging across.
I planned to create a channel and have a number of clients subscribe to it. Each time a message is posted to the channel it will be published through PubNub to all the subscribers. I was about to add the storage and playback add-on to add persistence of these messages. I want to keep the entire history of a channel but it according to the documentation and if I am reading it correctly I can only access any messages posted in the last 24 hours? I don't expect a huge amount of traffic with a maximum of around 30 subscribers to a channel.
Is what I am hoping to achieve even possible or would I have to pay an additional $2 incrementally for every additional day that passes going forwards? I effectively want to publish all messages to PubNub and be able to do a call to PubNub to retrieve all historic messages for a given channel.
Thanks for your help in advance
You can page through every message for a given channel using a history loop. See more documentation here.
Thanks for your response the link you sent makes sense in looping through the history of the messages. I'm still a bit confused over the 24 hour history specified alongside the Storage & Playback module. Does this mean I mis-read this and I will be able to loop back through all my historic messages if I have paid for this module without an extra charge of $2 per day?
Yes, you would need to configure the duration to "Forever" if you want to keep all messages for later retrieval. Or you can configure duration for less than forever if 1 to 30 days fulfills your requirements.