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 / Consumer

Consumer<T>

Type parameters

Index

Constructors

Methods

Constructors

constructor()

Signature

new Consumer<T>(): Consumer<T>;

Type parameters

Returns

Consumer<T>

Methods

perform()

Processes a batch of messages. Consumers should process a batch of messages and return a result containing
the success or failure of batch.
A batch should be processed in a timely manner. This means the batch size needs to be
adjusted to ensure timely processing.

Signature

Abstract perform(batch: Batch<T>): Promise<ConsumerResult>;

Parameters

NameTypeDescription
batchBatch<T>The batch of messages to process.

Returns

Promise<ConsumerResult>

The result of the batch processing.

Defined in: src/app/Consumer.ts:22