Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@PartitionOffset supprt TopicPartitionOffset.SeekPosition #3178

Closed
Wzy19930507 opened this issue Apr 2, 2024 · 1 comment · Fixed by #3188
Closed

@PartitionOffset supprt TopicPartitionOffset.SeekPosition #3178

Wzy19930507 opened this issue Apr 2, 2024 · 1 comment · Fixed by #3188

Comments

@Wzy19930507
Copy link
Contributor

Wzy19930507 commented Apr 2, 2024

Expected Behavior

@PartitionOffset Support SeekPosition.BEGINNING, SeekPosition.END, SeekPosition.TIMESTAMP

Context

When MessageListenerContainer init, seek consumer offsets by SeekPosition.

Wzy19930507 added a commit to Wzy19930507/spring-kafka that referenced this issue Apr 2, 2024
* align `@PartitionOffset` to `TopicPartitionOffset`.
* add unit test for `@PartitionOffset.SeekPosition`.
@artembilan
Copy link
Member

That request might make sense, but is not so easy to implement.
There is needed an extra logic in the KafkaListenerAnnotationBeanPostProcessor to build TopicPartitionOffset properly from that annotation.

Feel free to contribute the fix though!

Wzy19930507 added a commit to Wzy19930507/spring-kafka that referenced this issue Apr 10, 2024
* add adoc whats-new.adoc or listener-annotation.adoc.
* align `@PartitionOffset` to `TopicPartitionOffset`.
* add unit test for `@PartitionOffset.SeekPosition`.
* add unit for SpEL partitions to Integer[] and Integer.
@sobychacko sobychacko added this to the 3.2.0-RC1 milestone Apr 11, 2024
sobychacko pushed a commit that referenced this issue Apr 11, 2024
* 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants