Repository navigation
Expand file tree
/
Copy pathbatch-processing.yaml
More file actions
33 lines (32 loc) · 1.58 KB
/
Copy pathbatch-processing.yaml
File metadata and controls
33 lines (32 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Copyright (C) 2026 Antony Stubbs and contributors
schema_version: 1
kind: feature
title: Batch processing
category: processing
module: parallel-consumer-core
maturity: production-use
availability:
status: published
since: 0.5.0.0
evidence:
tag: 0.5.0.0
path: README.adoc
basis: The PollContext change made batch support available across the processing APIs.
readme_anchor: batching
summary: Deliver multiple records to one processing invocation when a downstream operation benefits from batching.
use_this_when:
- Your downstream API accepts batches, such as a bulk indexing or write endpoint.
- You can handle a batch retry as a unit of work.
setup:
option: ParallelConsumerOptions.batchSize
rule: Choose a batch-processing API after setting a batch size.
opt_in:
mechanism: Set batchSize and use a batch processing API.
isolated_from_stable_modules: false
boundaries:
- batchSize must be at least 1, which is also the default and the non-batching configuration; ParallelConsumerOptions.validate() rejects zero, a negative and null with an IllegalArgumentException at construction. Before that bound, zero was accepted and the consumer started cleanly and processed nothing.
- Single-record PollContext accessors and normal processing APIs are invalid while batching is configured.
- An exception returns every record in the batch to retry; the next attempt need not contain the same batch grouping.
references:
- label: Core batch example
path: parallel-consumer-examples/parallel-consumer-example-core/src/main/java/bz/stub/parallelconsumer/examples/core/CoreApp.java