pubnub_subscribe_and_receive_messages
Subscribe to a PubNub channel, receive a specified number of messages, and automatically unsubscribe. Use to listen for messages on a channel, with an optional timeout to control the waiting period.
Instructions
Subscribes to a PubNub channel and waits to receive a specified number of messages, then automatically unsubscribes. Call this tool when you need to listen for messages on a channel. Optionally specify a timeout in milliseconds to avoid waiting indefinitely.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
channel | Yes | Name of the PubNub channel to subscribe to and receive messages from | |
messageCount | No | Number of messages to wait for before unsubscribing (default: 1) | |
timeout | No | Optional timeout in milliseconds. If not all messages are received within this time, the subscription will end (default: no timeout) |