HomePhabricator
Diffusion Comm a767de4a3107

[services] Tunnelbroker - Add `waitUntilReady` function in AmqpManager

Description

[services] Tunnelbroker - Add waitUntilReady function in AmqpManager

Summary:
This diff is a part of the stack to fix the AMQP client reconnection issue.

The waitUntilReady function handles waiting for reconnection. This function uses on send() and ack() methods which send and acknowledge the message correspondingly.
The expected behavior is that we must wait while the connection/channel became available instead of returning an error immediately and stopping the execution.

Related linear task: ENG-1495

Test Plan:
Successfully built using yarn run-tunnelbroker-service-in-sandbox command.
Passing all AMQP unit tests in the last diff D4749 in a stack.

Reviewers: karol, tomek

Reviewed By: karol, tomek

Subscribers: ashoat, tomek, adrian, atul, karol, abosh

Differential Revision: https://phab.comm.dev/D4741

Details