You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Fixes#3178
* add support for custom SeekPosition via `@PartitionOffset`
* align `@PartitionOffset` to `TopicPartitionOffset`
* add unit test for `@PartitionOffset.SeekPosition`
* add unit test for SpEL partitions to Integer[] and Integer
* address PR review.
Copy file name to clipboardExpand all lines: spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/receiving-messages/listener-annotation.adoc
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -150,6 +150,25 @@ public void listen(ConsumerRecord<?, ?> record) {
150
150
151
151
The initial offset will be applied to all 6 partitions.
152
152
153
+
Since 3.2, `@PartitionOffset` support `SeekPosition.END`, `SeekPosition.BEGINNING`, `SeekPosition.TIMESTAMP`, `seekPosition` match `SeekPosition` enum name:
Copy file name to clipboardExpand all lines: spring-kafka-docs/src/main/antora/modules/ROOT/pages/whats-new.adoc
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,6 +75,11 @@ Provides new class `EndpointHandlerMultiMethod` to handler multi method for retr
75
75
`ConsumerCallback` provides a new API to seek to an offset based on a user-defined function, which takes the current offset in the consumer as an argument.
76
76
See xref:kafka/seek.adoc#seek[Seek API Docs] for more details.
77
77
78
+
[[x32-annotation-partition-offset-seek-position]]
79
+
=== @PartitionOffset support for SeekPosition
80
+
Adding `seekPosition` property to `@PartitionOffset` support for `TopicPartitionOffset.SeekPosition`.
81
+
See xref:kafka/receiving-messages/listener-annotation.adoc#manual-assignment[manual-assignment] for more details.
82
+
78
83
[[x32-topic-partition-offset-constructor]]
79
84
=== New constructor in TopicPartitionOffset that accepts a function to compute the offset to seek to
80
85
`TopicPartitionOffset` has a new constructor that takes a user-provided function to compute the offset to seek to.
Copy file name to clipboardExpand all lines: spring-kafka/src/main/java/org/springframework/kafka/annotation/KafkaListenerAnnotationBeanPostProcessor.java
0 commit comments