Page MenuHomePhabricator

[tunnelbroker] Add exponential backoff to AMQP connection
ClosedPublic

Authored by bartek on Oct 3 2024, 8:42 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 18, 10:15 AM
Unknown Object (File)
Wed, Dec 18, 10:15 AM
Unknown Object (File)
Wed, Dec 18, 10:15 AM
Unknown Object (File)
Wed, Dec 18, 10:15 AM
Unknown Object (File)
Tue, Nov 26, 4:00 AM
Unknown Object (File)
Mon, Nov 25, 3:02 AM
Unknown Object (File)
Sat, Nov 23, 3:53 AM
Unknown Object (File)
Fri, Nov 22, 12:00 AM
Subscribers

Details

Summary

Added connection retries for AMQP. This only works on Tunnelbroker startup, it doesn't fix our logic yet for disconnects while TB is already running

Depends on D13593

Test Plan

Started Tunnelbroker, but waited with starting RabbitMQ. After running Rabbit, the connection was established after a few attempts

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Oct 3 2024, 9:01 AM
bartek added inline comments.
services/tunnelbroker/src/amqp.rs
32–36 ↗(On Diff #44872)

I chose this experimentally basing on how long local rabbitmq gets up, but we might want to add more retries.

56 ↗(On Diff #44872)

I made it this way because this function is going to be split in the next diffs

This revision is now accepted and ready to land.Oct 7 2024, 1:34 AM