Page MenuHomePhabricator

[tunnelbroker] Add RPC for closing WebSocket sessions
ClosedPublic

Authored by bartek on Sep 2 2024, 11:49 PM.
Tags
None
Referenced Files
F4080539: D13228.id.diff
Sat, Feb 15, 9:28 PM
Unknown Object (File)
Sat, Feb 15, 12:18 AM
Unknown Object (File)
Tue, Feb 11, 5:26 AM
Unknown Object (File)
Jan 15 2025, 6:55 AM
Unknown Object (File)
Dec 25 2024, 7:48 AM
Unknown Object (File)
Dec 18 2024, 4:43 AM
Unknown Object (File)
Dec 18 2024, 4:43 AM
Unknown Object (File)
Dec 18 2024, 4:43 AM
Subscribers

Details

Summary

Address ENG-8217.

Added Tunnelbroker RPC that force-closes WebSocket session with given device ID (if present).
The message is not persisted - it makes no point of storing it if the device isn't connected to Tunnelbroker at the time.

Depends on D13227

Test Plan

Repeated test plan from D13227, now by calling the RPC

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Sep 3 2024, 12:13 AM
bartek added inline comments.
services/tunnelbroker/src/grpc/mod.rs
91–95 ↗(On Diff #43850)

Also noticed in the docs:

Setting the TTL to 0 causes messages to be expired upon reaching a queue unless they can be delivered to a consumer immediately. Thus this provides an alternative to the immediate publishing flag, which the RabbitMQ server does not support.

I considered this but decided to give it a short timeout (1000ms), just in case.

This is meant to be called by other services, right? After ENG-9129 is resolved, it should only be possible to access from other services?

This is meant to be called by other services, right? After ENG-9129 is resolved, it should only be possible to access from other services?

Yes, this is right. Only services should be able to call it (namely Identity)

This revision is now accepted and ready to land.Sep 6 2024, 6:10 AM