-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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](https://www.rabbitmq.com/docs/channels#high-channel-churn). 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
- Loading branch information
Showing
2 changed files
with
42 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters