public function subscribe($topicQueueName, callable $handler)
    {
        $isSubscriptionLoopActive = true;
        while ($isSubscriptionLoopActive) {
            $request = new SubscribeMessageRequest([
                'queueName'          => $topicQueueName,
                'pollingWaitSeconds' => 0,
            ]);

            try {
                $message = $this->client->send($request);
            } catch (RequestException $e) {
                throw $e;
            } catch (ResponseException $e) {
                $message = $e->getBody();

                if (!$message->has('code')) {
                    throw $e;
                } else if (!in_array($message->get('code'), ['7000', '6070'])) {    // 队列没有消息或队列中有太多不可见或者延时消息
                    throw $e;
                }
            } catch (\Exception $e) {
                throw $e;
            }

            if ($message === null || $message->get('msgBody') === null) {
                sleep(mt_rand(1, 5));
                continue;
            }

            call_user_func($handler,
                Utils::unserializeMessagePayload($message->get('msgBody')),
                new MessageHandler($this->client, $topicQueueName, $message)
            );

            unset($message);
        }
    }