I am integrating pubnub chat application with my android app, where I am creating a channel for two users ramesh and paul with channel name ramesh_paul, subscribing two users. I am not pushing any messages to that channel but after 15 minutes the channel is getting deleted.
Channels are not necessarily created nor destroyed - at least not from the developer's point of view. They are either active or inactive.
ACTIVE means that someone is subscribed and INACTIVE means no one is currently subscribed. If someone subscribes to the channel, it will be active again. This active/inactive is all about occupancy or the lack there of on a channel which is what PubNub Presence is all about.
If you do not publish to that channel in 15 minutes, or in 15 days or ever, but someone is subscribed to the channel, then it is active.
If you publish to the channel but no one is subscribed to it, then it is inactive but the publish still goes through to PubNub without error.
If you have Storage & Playback enabled, then PubNub will persist the message for that channel.
So channel gets deleted is not something that is happening. Check out the PubNub Knowledge Base for more details about channels and channel groups.
Above when I speak of active and inactive channels, I am hinting at a feature called Presence Webhooks. Refer to this StackOverflow thread for full details about PubNub Presence Webhooks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With