Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

Dev Guide
Dev GuideUser GuidesLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

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

Parameters

NameTypeDescription
queueNamestringName of the queue, as defined in app.yml
queueMessageT | 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

Parameters

NameTypeDescription
queueNamestringName of the queue, as defined in app.yml
messagesQueueMessage<T>[] | T[]List of JSON-seralizable messages to send

Returns

Promise<void>

Defined in: src/queues/Queue.ts:36