Consumer
OCP App SDK / Consumer
Consumer<T>
Type parameters
T
extendsJSONEncodable
Index
Constructors
Methods
Constructors
constructor()
Signature
new Consumer<T>(): Consumer<T>;
Type parameters
T
extendsJSONEncodable
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
Name | Type | Description |
---|---|---|
batch | Batch <T > | The batch of messages to process. |
Returns
Promise
<ConsumerResult
>
The result of the batch processing.
Defined in: src/app/Consumer.ts:22
Updated 9 months ago