File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
src/main/java/com/rabbitmq/stream/impl Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -686,8 +686,8 @@ private void assignConsumersToStream(
686
686
} else {
687
687
for (SubscriptionTracker affectedSubscription : subscriptions ) {
688
688
ManagerPool subscriptionPool = null ;
689
- boolean reassigned = false ;
690
- while (!reassigned ) {
689
+ boolean reassignmentCompleted = false ;
690
+ while (!reassignmentCompleted ) {
691
691
try {
692
692
if (affectedSubscription .consumer .isOpen ()) {
693
693
Client .Broker broker = pickBroker (candidates );
@@ -715,11 +715,14 @@ private void assignConsumersToStream(
715
715
}
716
716
subscriptionPool .add (
717
717
affectedSubscription , offsetSpecification , false );
718
- reassigned = true ;
718
+ reassignmentCompleted = true ;
719
+ } else {
720
+ reassignmentCompleted = true ;
719
721
}
720
722
}
721
723
} else {
722
724
LOGGER .debug ("Not re-assigning consumer because it has been closed" );
725
+ reassignmentCompleted = true ;
723
726
}
724
727
} catch (TimeoutStreamException e ) {
725
728
LOGGER .debug (
@@ -740,6 +743,7 @@ private void assignConsumersToStream(
740
743
} catch (Exception e ) {
741
744
LOGGER .warn (
742
745
"Error while re-assigning subscription from stream {}" , stream , e );
746
+ reassignmentCompleted = true ;
743
747
}
744
748
}
745
749
}
You can’t perform that action at this time.
0 commit comments