Skip to content

Commit 8a966f9

Browse files
authored
fix: Stop disconnecting consumers from MultiTopicConsumer on connection errors if not using regex (#379)
1 parent d963be5 commit 8a966f9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/consumer/multi.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,11 @@ impl<T: 'static + DeserializeMessage, Exe: Executor> Stream for MultiTopicConsum
383383
"Unexpected error consuming from pulsar topic {}: {}",
384384
&topic, e
385385
);
386-
topics_to_remove.push(topic.clone());
386+
// Only remove topic from MultiTopicConsumer on error if they
387+
// can be re-added later by regex
388+
if self.topic_regex.is_some() {
389+
topics_to_remove.push(topic.clone());
390+
}
387391
}
388392
}
389393
} else {

0 commit comments

Comments
 (0)