[#3686] Fix getting Kafka consumer positions; fix integration tests.#3692
Merged
sophokles73 merged 1 commit intoeclipse-hono:masterfrom Sep 18, 2025
Merged
Conversation
e06b600 to
81874ad
Compare
81874ad to
270a5a5
Compare
sophokles73
reviewed
Sep 17, 2025
| public boolean isOffsetsCommitNeededForTopic(final String topic) { | ||
| public synchronized boolean isOffsetsCommitNeededForTopic(final String topic) { | ||
| if (offsetsMap.keySet().stream().noneMatch(tp -> tp.topic().equals(topic))) { | ||
| LOG.info("isOffsetsCommitNeededForTopic: no offsets stored for topic {} (yet); offset commit may be needed after having fetched positions", |
Contributor
There was a problem hiding this comment.
will this happen regularly and often in production? Or is this just a safeguard against the peculiarities of our integration tests where we permanently create and delete tenants/topics? If it is the former, then we should probably use DEBUG level ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes #3686.
The changes here address 2 causes for test-timeout issues:
The first cause is mitigated by first making sure that a topic has been assigned to the consumer before deleting it (and by the change in "isOffsetsCommitNeededForTopic()" as a safeguard).
For the 2nd cause, a dedicated getPositionIfTopicExists() method has been added.