HomePhabricator
Diffusion Comm 81bef76c0ef3

[services] Tunnelbroker - Adding handling of messages to send from the client

Description

[services] Tunnelbroker - Adding handling of messages to send from the client

Summary:
This diff introduces handling messages to be sent from the client by messagesToSend incoming gRPC message.

Tunnelbroker receives messages from the client and puts them into a messages table in the database, then put a message into the AMQP queue to trigger the delivery. Tunnelbroker generates a unique message ID for each message and sends it back to the client as a processedMessages.

Linear task: ENG-2060

Test Plan:

  1. Connect as a Client 1 by the gRPC client to the bidirectional stream with the sessionID corresponding to the Client 1 deviceID in metadata.
  2. Open another gRPC client and connect as a Client 2 to the bidirectional stream with the sessionID corresponding to the Client 2 deviceID in metadata.
  3. From Client 1 send a messagesToSend message to the gRPC stream with the message data include toDeviceID from Client 2.

The expected result is that Client 2 will receive a gRPC stream message with the data sent from Client 1.

Reviewers: jon, varun, marcin

Reviewed By: jon

Subscribers: ashoat, tomek, atul, abosh

Differential Revision: https://phab.comm.dev/D5592

Details

Provenance
maxAuthored on Nov 10 2022, 5:36 AM
Reviewer
jon
Differential Revision
D5592: [services] Tunnelbroker - Adding handling of messages to send from the client
Parents
rCOMMd35c221aae8c: [services] Tunnelbroker - Removing processed messages
Branches
Unknown
Tags
Unknown