Listing the Pub/Sub subscription consumers

2019-03-02 11:47发布

问题:

It is possible for a service to do long polling on a pub/sub subscription. That obviously requires a TCP connection to be constantly open between the pub/sub service and the client. Is there any way to find out if a certain subscription has that TCP connection open?

回答1:

There is no way to list all consumers for a Pub/Sub subscription, no. This would be tough as there are three different types of subscribers: push, pull, and streaming pull. Only the last one maintains an open connection to the server.