Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[DO NOT MERGE] test for reconnection to RabbitMQ#4736

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
battermann wants to merge11 commits intodevelop
base:develop
Choose a base branch
Loading
fromWPB-19422-rabbit-mq-connection-loss-leads-to-backend-notification-pusher-getting-stuck-2

Conversation

@battermann
Copy link
Contributor

Checklist

  • Add a new entry in an appropriate subdirectory ofchangelog.d
  • Read and follow thePR guidelines

@zebotzebot added the ok-to-testApproved for running tests in CI, overrides not-ok-to-test if both labels exist labelAug 28, 2025
@jschaul
Copy link
Member

  1. run the docker-compose services, either on latest commit; or on a previous commit using toxiproxy
  2. start the test:TEST_INCLUDE=testRabbitMQConnection make ci-safe package=integration
  3. when the prompt appears, break the connection in some way. Use either./toxiproxy-rabbitmq-terminate.sh or a way with haproxy (you need to first fix the configuration, somehow the haproxy setup isn't quite working yet on that latest commit
  4. re-establish a connection (press enter in the toxiproxy script)
  5. press enter in the integration test so it attempts to send another message. If the test is green then, well, you could not reproduce an issue.

@jschauljschaulforce-pushed theWPB-19422-rabbit-mq-connection-loss-leads-to-backend-notification-pusher-getting-stuck-2 branch from37a7252 to835591aCompareAugust 28, 2025 15:49
Copy link
Contributor

@lwillelwilleAug 28, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

In this test, we seem to be discretely doing things:

sending + consuming
(kill connection + wait for reconnect)
sending + consuming

I think that's not really what happens in the background worker, or in gundeck for forwarding notifications. Those processes would be waiting for new AMQP messages all the time, and suddenly the disconnect would kick.

What happens if the RabbitMQ connection is killed while sending/consuming messages?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It's correct that we test that sending and receiving works, then kill RabbitMQ, restart it and wait for reconnect and then test sending and receiving again.

But I don't understand what you mean with "that's not what happens in background worker". The background worker is always connected to the queue, also when the outage starts. Or more precisely, it's a thread in the background worker, that should constantly and indefinitely try to reconnect or restart if killed.

Gundeck in not involved as from the logs we can see that it's the notification-pusher that while trying to establish a connection to RabbitMQ.

Trying to kill RabbitMQwhile bg worker is consuming messages is an interesting idea. What we do is, we kill the broker, while the bg is connected, however there are no messages being processed when the connection is killed, because the queue is empty. Killing the broker while the queue contains unprocessed messages is technically a bit difficult because when we take RabbitMQ down we also cannot produce messages. Still maybe worthwhile to try to find a workaround and test this?

@battermannbattermannforce-pushed theWPB-19422-rabbit-mq-connection-loss-leads-to-backend-notification-pusher-getting-stuck-2 branch from835591a to082947aCompareSeptember 1, 2025 13:43
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@lwillelwillelwille left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

ok-to-testApproved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@battermann@jschaul@lwille@zebot

[8]ページ先頭

©2009-2025 Movatter.jp