Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1534,6 +1534,12 @@ ifndef::github_name[]
toc::[]
endif::[]

== 0.5.4.0

=== Improvements

* feature: Add batch by key processing order, creating batches of the same key

== 0.5.3.4

=== Fixes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,14 @@ public enum ProcessingOrder {
* Process messages in key order. Concurrency is at most the number of unique keys in a topic, limited by the
* max concurrency or uncommitted settings.
*/
KEY
KEY,

/**
* Together batch size > 1, creates batches of the same key.
* Concurrency is at most the number of unique keys in a topic, limited by the max concurrency or uncommitted
* settings.
*/
BATCH_BY_KEY
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static ShardKey of(WorkContainer<?, ?> wc, ProcessingOrder ordering) {

public static ShardKey of(ConsumerRecord<?, ?> rec, ProcessingOrder ordering) {
return switch (ordering) {
case KEY -> ofKey(rec);
case KEY, BATCH_BY_KEY -> ofKey(rec);
case PARTITION, UNORDERED -> ofTopicPartition(rec);
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ void workQueuesEmptyWhenAllWorkComplete() {
@ParameterizedTest
@EnumSource
void resumesFromNextShard(ParallelConsumerOptions.ProcessingOrder order) {
Assumptions.assumeFalse(order == KEY); // just want to test ordered vs unordered
Assumptions.assumeFalse(order == KEY || order == BATCH_BY_KEY); // just want to test ordered vs unordered

ParallelConsumerOptions<?, ?> build = ParallelConsumerOptions.builder()
.ordering(order)
Expand Down
Loading