Update the lastRequestTime to prevent overlapping restarts. (#373)
When a restart occurs due to no activity set the lastRequestTime to now to prevent ti from overlapping itself.
This commit is contained in:
parent
2e2c892b7e
commit
c1e38f0126
1 changed files with 5 additions and 0 deletions
|
|
@ -265,6 +265,11 @@ public class ShardConsumer {
|
|||
if (subscriber != null) {
|
||||
subscriber.cancel();
|
||||
}
|
||||
//
|
||||
// Set the last request time to now, we specifically don't null it out since we want it to trigger a
|
||||
// restart if the subscription still doesn't start producing.
|
||||
//
|
||||
lastRequestTime = Instant.now();
|
||||
startSubscriptions();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue