Version: v2
Class: PubSubService
#
Properties#
clientâ–ª Static
Protected
client: PubSubClientV2
#
Defined in#
driverâ–ª Static
Protected
driver: "synchronous"
| "google"
#
Defined in#
instanceâ–ª Static
Protected
instance: PubSubService
#
Defined in#
Methods#
closeAllâ–¸ closeAll(): Promise
<void
>
#
ReturnsPromise
<void
>
#
Defined in#
getAllSubscriptionsâ–¸ getAllSubscriptions(): Promise
<AllSubscriptions
[]>
Retrieves a list of subscribers
#
ReturnsPromise
<AllSubscriptions
[]>
#
Defined in#
getSubscribersâ–¸ getSubscribers(): Subscribers
#
ReturnsSubscribers
#
Defined in#
initClientâ–¸ initClient(): void
#
Returnsvoid
#
Defined in#
publishâ–¸ publish<T
>(topic
, message
, options?
): Promise
<string
>
Publishes new orders to PubSub.
#
Type parametersName | Type |
---|---|
T | extends TopicProperties |
#
ParametersName | Type |
---|---|
topic | T |
message | Record <string , unknown > |
options? | PublishOptions |
#
ReturnsPromise
<string
>
#
Defined in#
startSubscriptionsâ–¸ startSubscriptions(): Promise
<void
>
#
ReturnsPromise
<void
>
#
Defined in#
subscribeâ–¸ subscribe(subscription
): Promise
<void
>
Subscribes to any given topic
#
ParametersName | Type |
---|---|
subscription | SubscriberTuple |
#
ReturnsPromise
<void
>
#
Defined in#
getInstanceâ–¸ Static
getInstance(): PubSubService
#
Returns#
Defined in#
isHealthyâ–¸ Static
isHealthy(): boolean
#
Returnsboolean