Queue
OCP App SDK / Queue
Queue
Interface to send messages to a queue
Index
Methods
Methods
send()
Send a single queue message to a queue.
Signature
send<T>(queueName: string, queueMessage: T | QueueMessage<T>): Promise<void>;
Type parameters
T
extendsJSONEncodable
Parameters
Name | Type | Description |
---|---|---|
queueName | string | Name of the queue, as defined in app.yml |
queueMessage | T | QueueMessage <T > | JSON-seralizable message to send |
Returns
Promise
<void
>
Defined in: src/queues/Queue.ts:29
sendBatch()
Sends a batch of queue messages to a queue.
Signature
sendBatch<T>(queueName: string, messages: QueueMessage<T>[] | T[]): Promise<void>;
Type parameters
T
extendsJSONEncodable
Parameters
Name | Type | Description |
---|---|---|
queueName | string | Name of the queue, as defined in app.yml |
messages | QueueMessage <T >[] | T [] | List of JSON-seralizable messages to send |
Returns
Promise
<void
>
Defined in: src/queues/Queue.ts:36
Updated 9 months ago