OpenHiva::Subscriber::StopReadMessage
Description
Stops receiving messages. After message receiving is stopped, the user callback function is not invoked and the message is directly discarded.
Prototype
uint32_t OpenHiva::Subscriber::StopReadMessage()
Parameters
None
Returns
The return value is of the uint32_t type. If the operation is successful, HIVA_SUCCESS (value being 0) is returned. If other values are returned, the operation fails.
Usage
- You can invoke the StopReadMessage interface to stop the normal message subscription. After the subscription is stopped, the user callback function is not invoked.
- After StopReadMessage is invoked, you can use OpenHiva::Subscriber::StartReadMessage to restore message receiving.
Precautions
- Reentrant, synchronous interface.
- When the CreateSubscriber interface fails to be invoked, the StopReadMessage interface returns a failure message.
Parent topic: OpenHiva::Subscriber