Page MenuHomePhabricator

[tunnelbroker] Implement lazy AMQP channel wrapper
ClosedPublic

Authored by bartek on Sun, Oct 6, 11:51 PM.
Tags
None
Referenced Files
F2922000: D13621.id44919.diff
Mon, Oct 7, 6:25 PM
F2921994: D13621.diff
Mon, Oct 7, 6:18 PM
Unknown Object (File)
Mon, Oct 7, 3:04 PM
Unknown Object (File)
Mon, Oct 7, 12:35 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