Skip to content

Commit

Permalink
fix: once again fix logic for always setting the offset header
Browse files Browse the repository at this point in the history
  • Loading branch information
mherwig committed Nov 26, 2024
1 parent 4a18e98 commit 7909875
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,7 @@ public EventMessageContext get() {
throw new SubscriberDoesNotMatchSubscriptionException(errorMessage);
}

if (StringUtils.isNotEmpty(currentOffset)) {
Optional.ofNullable(message.getHttpHeaders()).ifPresent(headers -> headers.put("x-pubsub-offset-id", new ArrayList<>(List.of(currentOffset))));
}
Optional.ofNullable(message.getHttpHeaders()).ifPresent(headers -> headers.put("x-pubsub-offset-id", new ArrayList<>(List.of(state.getUuid()))));
}
return new EventMessageContext(message, includeHttpHeaders, streamLimit, ignoreDeduplication, span, spanInScope);
} catch (CouldNotPickMessageException | SubscriberDoesNotMatchSubscriptionException e) {
Expand Down

0 comments on commit 7909875

Please sign in to comment.