Skip to content

Recover connection if consumer recovery closes it #83

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

Merged
merged 4 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:
cache: 'maven'
- name: Start broker
run: ci/start-broker.sh
env:
RABBITMQ_IMAGE: 'pivotalrabbitmq/rabbitmq:main'
- name: Start toxiproxy
run: ci/start-toxiproxy.sh
- name: Display Java version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ private void recoverAfterConnectionFailure(
this.state(OPEN);
} catch (Exception ex) {
// likely InterruptedException or IO exception
LOGGER.info(
LOGGER.warn(
"Error while trying to recover topology for connection '{}': {}",
this.name(),
ex.getMessage());
Expand Down Expand Up @@ -481,6 +481,13 @@ private void recoverConsumers() throws InterruptedException {
consumer.recoverAfterConnectionFailure();
consumer.state(OPEN);
LOGGER.debug("Recovered consumer {} (queue '{}')", consumer.id(), consumer.queue());
} catch (AmqpException.AmqpConnectionException ex) {
LOGGER.warn(
"Connection error while trying to recover consumer {} (queue '{}'), restarting recovery",
consumer.id(),
consumer.queue(),
ex);
throw ex;
} catch (Exception ex) {
LOGGER.warn(
"Error while trying to recover consumer {} (queue '{}')",
Expand Down