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
feat: Implement TopicConfigWatcher #377
Conversation
|
||
import java.time.Duration; | ||
import java.util.function.Consumer; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import java.time.Duration; | |
import java.util.function.Consumer; | |
interface Factory { | |
TopicConfigWatcher New(Consumer<Topic> receiver, Duration period); | |
} |
...bsublite/src/main/java/com/google/cloud/pubsublite/internal/wire/TopicConfigWatcherImpl.java
Outdated
Show resolved
Hide resolved
...lite/src/test/java/com/google/cloud/pubsublite/internal/wire/TopicConfigWatcherImplTest.java
Outdated
Show resolved
Hide resolved
17e0d09
to
6e2ecfa
Compare
Codecov Report
@@ Coverage Diff @@
## master #377 +/- ##
============================================
+ Coverage 72.15% 72.39% +0.23%
- Complexity 772 782 +10
============================================
Files 147 148 +1
Lines 4148 4191 +43
Branches 202 205 +3
============================================
+ Hits 2993 3034 +41
- Misses 1040 1042 +2
Partials 115 115
Continue to review full report at Codecov.
|
...d-pubsublite/src/main/java/com/google/cloud/pubsublite/internal/wire/TopicConfigWatcher.java
Outdated
Show resolved
Hide resolved
...bsublite/src/main/java/com/google/cloud/pubsublite/internal/wire/TopicConfigWatcherImpl.java
Outdated
Show resolved
Hide resolved
...d-pubsublite/src/main/java/com/google/cloud/pubsublite/internal/wire/TopicConfigWatcher.java
Outdated
Show resolved
Hide resolved
6e2ecfa
to
aba5f99
Compare
...ubsublite/src/main/java/com/google/cloud/pubsublite/internal/wire/PartitionCountWatcher.java
Outdated
Show resolved
Hide resolved
aba5f99
to
0b74d07
Compare
…er whenever it changes
0b74d07
to
af47585
Compare
The topic config watcher polls the topic config and calls an update handler whenever the config cahnges
Fixes #<issue_number_goes_here> ☕️