Page MenuHomePhabricator

[tunnelbroker] Implement lazy AMQP channel wrapper
ClosedPublic

Authored by bartek on Oct 6 2024, 11:51 PM.
Tags
None
Referenced Files
F3363400: D13621.id44919.diff
Mon, Nov 25, 2:07 AM
Unknown Object (File)
Thu, Nov 21, 11:54 PM
Unknown Object (File)
Thu, Nov 21, 5:15 PM
Unknown Object (File)
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
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