HomePhabricator
Diffusion Comm b92865431259

[tunnelbroker] Implement lazy AMQP channel wrapper

Description

[tunnelbroker] Implement lazy AMQP channel wrapper

Summary:
This cancels minor quality regression introduced earlier in D13604.

  • For websocket, we store the channel in the WebsocketSession struct and reuse it unless it's broken
  • However for gRPC, after opted out of channel pool, a new short-lived channel is created for every single call, which is against what RabbitMQ recommends.

Created a simple wrapper that lazily-initializes the channel upon first use, and creates a new one only if the previous was closed.

Depends on D13611

Test Plan: Added some additional logging and ran Commtest

Reviewers: kamil

Reviewed By: kamil

Subscribers: ashoat, tomek

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

Details

Provenance
bartekAuthored on Fri, Oct 4, 1:03 PM
Reviewer
kamil
Differential Revision
D13621: [tunnelbroker] Implement lazy AMQP channel wrapper
Parents
rCOMM51a32d2cff2a: [tunnelbroker] Recover AMQP before publishing messages
Branches
Unknown
Tags
Unknown