title: Amazon sns/sqs offline messages APNS(Pubnub,SNS,APNS)
body: <p>I am researching on Amazon SNS and Pubnub and APNS with its offline capability. And i had been reading on it for over 10 hours. Still havent consolidate all the details. </p>
  
  <p>Does anyone has experience with Amazon SNS/SQS that if the APNS is offline, does it store the offline messages for you then sends it when its back online, as i read that Apple APNS removes the push notifications thats offline only stores the newest message. I am not sure if Amazon SQS would be able to know if the messages is not sent through APNS and queue it up. (As the structure goes SQS/SNS sends the messages to APNS, then the APNS to the devices, but what if the APNS sees the device is offline, is there a mechanism so the SNS/SQS knows that is offline and queue those messages up??)</p>
  
  <p>And it looks like the payload for APNS is still limited by the OS to 2kb even the Amazon SNS is at 256kb? </p>
  
  <p>I have read this thread  <a href="https://stackoverflow.com/questions/20843632/what-is-advantage-and-disadvantage-of-using-pubnub-over-amazon-simple-notificati/20854280#20854280">What is advantage and disadvantage of using pubnub over Amazon Simple Notification Service (sns)?</a></p>
  
  <p>But not sure which i should go for, i just need simple push notification that is reliable(Sure that it is sent to the device) and also stored if it is offline and send back to the device when it is back online. But IOS7 and prior seems to have a very low message payload size 256kb, i need atleast 1.5kb</p>
  
  <p>An Additional point, is Pubnub similar to Whatsapp type, with TCP or XMPP protocol, that stays connected? Because i read that </p>
  
  <p><em>Apple restricts applications on iOS from running in the background and therefore iOS developers may choose to implement APNS as a means to deliver realtime notifications to an iOS device when the application is running in the background.</em></p>
  
  <p>So does it mean even if i have pubnub installed, when the app is in the background, i would NOT be able to receive messages from Pubnub? As IOS won't allowed Pubnub to continue to connect its socket in the background? But i am sure IOS apps can run in the background though and keep the socket connection alive? </p>