Skip to content

Commit

Permalink
fix: subscriptions use actual initial offset (#3773)
Browse files Browse the repository at this point in the history
  • Loading branch information
matt2e authored Dec 16, 2024
1 parent 8803a38 commit 602beba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void consume(PubSubEvent event) throws Exception {
void consumeFromLatest(PubSubEvent event) throws Exception {
}

ConsumeFromLatest
@Subscription(topic = Topic2Topic.class, from = FromOffset.BEGINNING)
@Retry(count = 2, minBackoff = "1s", maxBackoff = "1s")
public void consumeButFailAndRetry(PubSubEvent event) {
throw new RuntimeException("always error: event " + event.getTime());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ public static SubscriptionAnnotation fromJandex(IndexView indexView, AnnotationI
}
topicName = annotation.value().asString();
AnnotationValue moduleValue = annotation.value("module");
AnnotationValue deadLetterValue = annotation.value("deadLetter");
AnnotationValue deadLetterValue = subscriptions.value("deadLetter");
boolean deadLetter = deadLetterValue != null && !deadLetterValue.asString().isEmpty() && deadLetterValue.asBoolean();
AnnotationValue from = annotation.value("from");
AnnotationValue from = subscriptions.value("from");
FromOffset fromOffset = from == null ? FromOffset.LATEST : FromOffset.valueOf(from.asEnum());

return new SubscriptionAnnotation(
Expand Down

0 comments on commit 602beba

Please sign in to comment.