Page MenuHomePhabricator

[tunnelbroker] Add RPC for closing WebSocket sessions
ClosedPublic

Authored by bartek on Mon, Sep 2, 11:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 15, 12:02 PM
Unknown Object (File)
Sun, Sep 15, 2:27 AM
Unknown Object (File)
Fri, Sep 13, 1:20 PM
Unknown Object (File)
Thu, Sep 12, 3:15 AM
Unknown Object (File)
Wed, Sep 11, 9:48 AM
Unknown Object (File)
Wed, Sep 11, 6:23 AM
Unknown Object (File)
Tue, Sep 10, 12:00 PM
Unknown Object (File)
Sun, Sep 8, 1:14 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
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Tue, Sep 3, 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.Fri, Sep 6, 6:10 AM