Message persisting logic in this diff:
- On gRPC `Send` [[ https://github.com/CommE2E/comm/blob/b25f0b3ef65feea03926c7bdcb3290c966da755d/native/cpp/CommonCpp/grpc/protos/tunnelbroker.proto#L21 | request ]] we are storing a message to the dynamoDB database **before** the AMQP message is pushed to the RabbitMQ. In this case, we are making sure that the message is persisted and we don't rely on the RabbitMQ delivery only.
- On gRPC `Get` [[ https://github.com/CommE2E/comm/blob/b25f0b3ef65feea03926c7bdcb3290c966da755d/native/cpp/CommonCpp/grpc/protos/tunnelbroker.proto#L22 | request ]], we are retrieving the messages for the `deviceID` from the dynamoDB database **first** and delivering them to the device.
- After retrieving messages from the database, wait for the messages from the AMQP message broker (RabbitMQ);
- Follow-up messages are delivered as `Get` [[ https://github.com/CommE2E/comm/blob/b25f0b3ef65feea03926c7bdcb3290c966da755d/native/cpp/CommonCpp/grpc/protos/tunnelbroker.proto#L73 | stream request messages ]];
- On message broker (RabbitMQ) message delivery, delete that message from the database by unique messageID.