[services] Tunnelbroker - Extracting deleteQueueIfEmpty logic to a separate function
Summary:
This diff introduces extracting the deleteQueueIfEmpty calling for the DeliveryBroker into a separate function to call it in the following D6626 from the Rust gRPC handler.
The reason for extracting is disabling messages persisting in the DynamoDB database by the config flag introduced in the D6622. In the following D6626, we will call deleteQueueIfEmpty function, but skip to remove the messages from the database if the config flag from D6622 is presented.
Linear task: ENG-2641
Test Plan:
- CI gates are passed.
- Manual testing should be performed on the following D6626 diff.
Reviewers: jon, bartek
Reviewed By: jon, bartek
Subscribers: ashoat, tomek, atul
Differential Revision: https://phab.comm.dev/D6625