Page MenuHomePhabricator

[tunnelbroker] Add RPC for closing WebSocket sessions
ClosedPublic

Authored by bartek on Sep 2 2024, 11:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 10, 6:02 AM
Unknown Object (File)
Sat, Nov 9, 2:57 PM
Unknown Object (File)
Sat, Nov 9, 2:49 PM
Unknown Object (File)
Sat, Nov 9, 2:43 PM
Unknown Object (File)
Sat, Nov 9, 7:38 AM
Unknown Object (File)
Sun, Nov 3, 10:05 PM
Unknown Object (File)
Tue, Oct 29, 12:24 AM
Unknown Object (File)
Tue, Oct 22, 6:30 PM
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
No Lint Coverage
Unit
No Test Coverage

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

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