Skip to content

Class: ServerlessPool

Defined in: glide-mq/src/serverless-pool.ts:29

Constructors

Constructor

ts
new ServerlessPool(): ServerlessPool;

Returns

ServerlessPool

Accessors

size

Get Signature

ts
get size(): number;

Defined in: glide-mq/src/serverless-pool.ts:72

Number of cached producers.

Returns

number

Methods

closeAll()

ts
closeAll(): Promise<void>;

Defined in: glide-mq/src/serverless-pool.ts:63

Close all cached producers and clear the cache. Call this during Lambda SIGTERM or explicit cleanup.

Returns

Promise<void>


getProducer()

ts
getProducer<D>(name, opts): Producer<D>;

Defined in: glide-mq/src/serverless-pool.ts:40

Get or create a Producer for the given queue name and options. Returns a cached instance if one exists with matching connection parameters.

Note: Injected clients and custom serializers bypass caching to prevent collisions where different instances could map to the same cache key.

Type Parameters

Type ParameterDefault type
Dany

Parameters

ParameterType
namestring
optsProducerOptions

Returns

Producer<D>

Released under the Apache-2.0 License.