Page MenuHomePhabricator

[tunnelbroker] Implement lazy AMQP channel wrapper
ClosedPublic

Authored by bartek on Sun, Oct 6, 11:51 PM.
Tags
None
Referenced Files
F2926984: D13621.id44941.diff
Tue, Oct 8, 7:21 PM
F2926890: D13621.diff
Tue, Oct 8, 5:35 PM
Unknown Object (File)
Mon, Oct 7, 6:25 PM
Unknown Object (File)
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
No Lint Coverage
Unit
No Test Coverage