Page MenuHomePhabricator

[tunnelbroker] Implement lazy AMQP channel wrapper
ClosedPublic

Authored by bartek on Oct 6 2024, 11:51 PM.
Tags
None
Referenced Files
F3328670: D13621.id44920.diff
Wed, Nov 20, 2:36 PM
Unknown Object (File)
Sat, Nov 9, 3:56 AM
Unknown Object (File)
Sat, Nov 9, 2:23 AM
Unknown Object (File)
Wed, Nov 6, 2:41 PM
Unknown Object (File)
Mon, Nov 4, 12:00 PM
Unknown Object (File)
Mon, Nov 4, 9:50 AM
Unknown Object (File)
Sat, Nov 2, 11:17 AM
Unknown Object (File)
Mon, Oct 28, 6:58 PM
Subscribers

Details

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

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable