Skip to content

Commit

Permalink
Add CAUTION to task batching doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ryamagishi committed Jul 30, 2024
1 parent 4f6891d commit 2bd4b5e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/task-batching.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ The above methods is not called automatically even when an error occurs in this
This method runs in different thread from the `process(ProcessingContext<T>, T)` thread.
|===

[CAUTION]
====
Batch-flush is done in `BatchingProcessor`'s scheduled executor thread.
This means the parallelism of flushing has to be controlled by `ProcessorScope`, not only by `decaton.partition.concurrency` config. i.e.:
* Parallelize flushing per partition: `ProcessorScope.PARTITION`
* Parallelize flushing per processor thread: `ProcessorScope.THREAD`
====

Before getting started with the example, let's create a `HelloTask` domain object which can be used to simulate the scenario we described:

[source,java]
Expand Down

0 comments on commit 2bd4b5e

Please sign in to comment.