***

title: "PubSubJobQueueStrategy"
generated: true
---------------

<GenerationInfo sourceFile="packages/pub-sub-plugin/src/pub-sub-job-queue-strategy.ts" sourceLine="29" packageName="@vendure-community/pub-sub-plugin" />

This JobQueueStrategy uses Google Cloud Pub/Sub to implement a job queue for Vendure.
It should not be used alone, but as part of the [PubSubPlugin](/current/community-plugins/reference/pub-sub-plugin/#pubsubplugin).

Note: To use this strategy, you need to manually install the `@google-cloud/pubsub` package:

```shell
npm install @google-cloud/pubsub@^4.11.0
```

```ts title="Signature"
class PubSubJobQueueStrategy extends InjectableJobQueueStrategy implements JobQueueStrategy {
    init(injector: Injector) => ;
    destroy() => ;
    add(job: Job<Data>) => Promise<Job<Data>>;
    start(queueName: string, process: (job: Job<Data>) => Promise<any>) => ;
    stop(queueName: string, process: (job: Job<Data>) => Promise<any>) => ;
}
```

* Extends: InjectableJobQueueStrategy

* Implements: JobQueueStrategy

<div className="members-wrapper">

### init

\<MemberInfo kind="method" type={`(injector: Injector) => `}   />

### destroy

\<MemberInfo kind="method" type={`() => `}   />

### add

\<MemberInfo kind="method" type={`(job: Job<Data>) => Promise<Job<Data>>`}   />

### start

\<MemberInfo kind="method" type={`(queueName: string, process: (job: Job<Data>) => Promise<any>) => `}   />

### stop

\<MemberInfo kind="method" type={`(queueName: string, process: (job: Job<Data>) => Promise<any>) => `}   />

</div>
