This diff adds immediate delivery of messages when the client is online and connected to the bidirectional stream. We are using the AMQP server to immediate send messages.
When the client sends a message to another client through the Tunnelbroker, the message is stored in the database and the AMQP message is put into the AMQP server queue to which the Tunnelbroker (or another Tunnelbroker instance) is listen for new messages to come. After the new message is came from the AMQP server we will send it to the client as the [[ https://github.com/CommE2E/comm/blob/efbbde6e7eb567b9a7e1e1bbf4de562a77d2e35a/shared/protos/tunnelbroker.proto#L132 | MessagesToDeliver ]] by the gRPC stream message.
The client will process the message and send back the processed message ID to the Tunnelbroker as [[ https://github.com/CommE2E/comm/blob/efbbde6e7eb567b9a7e1e1bbf4de562a77d2e35a/shared/protos/tunnelbroker.proto#L112 | processedMessages ]] only after that, we will delete messages from the database.
Removing of processed messages implemented in D5584.
Linear task: [[ https://linear.app/comm/issue/ENG-2060/implement-tunnelbroker-grpc-messagesstream-api-handler-in-rust | ENG-2060 ]]