[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:
- Connect as a Client 1 by the gRPC client to the bidirectional stream with the sessionID corresponding to the Client 1 deviceID in metadata.
- 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.
- 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