Skip to content

PubNub listener stops listening to the messages after sometime. #163

Description

@gautam-tiwari
  • I have build an application which uses the pubnub go library. It subscribes to n number of pubnub channels on its start-up.
  • The listener for which the messages come consistently(atleast a couple of times in a day) it doesn't stops listening.
  • The listener for which the messages don't come consistently(one case I found was where there was no message send on the channel for 5 days) it stops listening to the messages.
  • It seems like if the listener is in idle state for a certain amount of time it stops listening to the channel.

Solution that I came up with:-

  • Run a cron job which checks for the last message received from the pubnub historical message and the last message that was processed by the pubnub listener handler.
  • It they differ then resubscribe.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions